Nothing Special   »   [go: up one dir, main page]

Skip to content
This repository has been archived by the owner on May 26, 2019. It is now read-only.
/ squint-style Public archive

An opinionated coding style and suite of linting configuration files.

Notifications You must be signed in to change notification settings

RyanWarner/squint-style

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

An opinionated coding style and suite of linting configuration files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published