Code Monkey home page Code Monkey logo

squint-style's Introduction

squint-style

Squint is a verbose and spacious coding style. It favors specific naming conventions and generous whitespace. Code should be as self documenting as possible and easy on the eyes.

BE CONSISTENT.

If you're editing code, take a few minutes to look at the code around you and determine its style. If they use spaces around all their arithmetic operators, you should too. If their comments have little boxes of hash marks around them, make your comments have little boxes of hash marks around them too.

The point of having style guidelines is to have a common vocabulary of coding so people can concentrate on what you're saying rather than on how you're saying it. We present global style rules here so people know the vocabulary, but local style is also important. If code you add to a file looks drastically different from the existing code around it, it throws readers out of their rhythm when they go to read it. Avoid this." - Google

Code quality can be measured by how efficiently it can be changed.

This project aims to help developers in their pursuit of more efficiently writing code that is lasting and welcoming to change.

( ! ) Work in progress. Think this project could be better? Submit a pull request, issue, or let me know.

Read the Documentation to learn the defaults with code examples.

Use the Config Files in combination with the tools listed below to enforce good code style on your projects.

Tools

A coding style guide is a complex thing. It can be hard to remember all the rules, especially when just starting out. In order to help enforce squint-style (or any style guide) you can use the following tools:

Setup

To setup the tools mentioned above in your project you can use these instructions as a guide. You can also use the example Gulp tasks as a starting point for your project.

Prerequisites

  1. Install gulp.js
    • npm install -g gulp
  2. Download all of the config files, and place them in your root directory.
    • git clone https://github.com/RyanWarner/squint-style.git
  3. Install scss-lint and respective Gulp plugin, gulp-scss-lint.
    • gem install scss-lint
    • npm install --save-dev gulp-scss-lint.
  4. Install csscomb Gulp plugin, gulp-csscomb.
    • npm install gulp-csscomb --save-dev
  5. Install eslint Gulp plugin, gulp-eslint.
    • npm install --save-dev gulp-eslint
  6. Add Gulp tasks for all 3 tools. See example gulpfile.js.

Other CSS Style Guides

Other JavaScript Style Guides


Inspired by @lilhinx.

squint-style's People

Contributors

ryanwarner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

benatwork

squint-style's Issues

csscomb property order is out of date.

  • Remove browser prefixes. gulp-autoprefixer takes care of this, so this will avoid the clutter.
  • Add the new flex spec, and update order to make more sense given the new flex work flow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.