wheelhouse-linter
v1.0.3
Published
The Wheelhouse Coding Standards for Easy to read Javascript and CSS
Downloads
3
Readme
Wheelhouse Linter
The Wheelhouse standards and recommendations for creating, and maintaining well-written, easy to digest Javascript and CSS code
Goals
- To bring together a collection of practices to unify the style and way that code is written in a code-base. All code in any code-base should look like it was written by a single person, regardless of the number of people contributing to that particular side of the project.
"If you want your code to be easy to write, make it easy to read." -- Robert C. Martin: a.k.a "Uncle Bob"
Features
- Automatic detection of Git tracked files for a simple to use approach
- Includes a thorough and sophistical ESLint configuration that has be Optimized for readability and clarity.
- Contains linting support for the most modern versions of JS as well as common libraries and frameworks such as Lodash, React, or Vue.
- Includes configuration for prettier which in conjunction with ESLint's fix mode allows for automatic code fixing for sane development.
- Is backed up with a just as thorough Stylint configuration, also offering the same capabilities utilizing prettier.
- A collection of gulp tasks to make the linting, fixing, and auto-formating of your code incredibly simple.
Usage
Outside of looking under the hook and finding a few cool rules you might not have seen before, it is incredibly easy to include the linter in a pre-existing project or configuration.
Extend ESLint
extends:
"./node_modules/wheelhouse-linter/.eslintrc.yml"
And we would do the exact same thing with our Styleling config.
Extend Styleling
extends:
"./node_modules/wheelhouse-linter/.stylelintrc.yml"
With Gulp
As mentioned before, all of the tooling is conveniently baked into gulp tasks for you. You can see an example of including it in the gulpfile.babel that is in this projects root.
Simply import it and have easy access to some common commands like 'lint:js', 'lint:css', 'fix:js', 'fix:css'
Some of the Tech
Gulp (Project | Homepage)
Bundled with predefined tasks for direct inclusion in your custom gulpfile
Stylelnit (Project | Homepage)
A PostCSS-based linter for CSS that also supports other language dialects such as SCSS and Sass.
ESLint (Project | Homepage)
The successor of both JSHint and JSCS. ESLint is configured here to use the Babel Parser to ensure full ES2017+ support. You can also use this plugin with xo which is an incredibly wonderful and modern Javascript linter.
Prettier (Project)
An Auto-formatting engine for Javascript, JSX, and flow which supports many intelligent features deployed automatically for you
Lint Stages (Project)
Provides automatically linting for all staged '.css' and '.js' files before they are commited to a repository