One Style to Rule Them All
No decisions to make. No
.jscsrc files to manage. It just
This module saves you (and others!) time in two ways:
- No configuration. The easiest way to enforce consistent style in your project. Just drop it in.
- Catch style errors before they're submitted in PRs. Saves precious code review time by eliminating back-and-forth between maintainer and contributor.
This is a linter for the future, based on the standard linter. It expects to be run within a babel environment, using the latest available babel syntax.
Rule Differences from Standard
- Always require parens for arrow functions, arrow-parens: always.
- Require commas in a multi-line block, comma-dangle: "always-multiline".
- Arrow functions everywhere, prefer-arrow-callback.
- Prefer spread instead of .apply where possible, prefer-spread.
- Template strings, prefer-template.
- Require a yield statement in generators, require-yield.
Methodology Differences from Standard
- We will freely update rules based on current best practices. Becuase of this we recommend that you lock down the current version of modern-standard.
- We want to move faster and be more receptive to community issues and contributions.
- Everything is under one organization, and all linting code is in a single repo. This makes it much easier for contributors.
- This is an experiment and we're happy if standard adopts these rules or if this repository is forked.
npm install modern-standard
- Add it to
- Check style automatically when you run
- Never give style feedback on a pull request again!
Text editor plugins
First, install modern-standard. Then, install the appropriate plugin for your editor:
SublimeLinter-contrib-modern-standard is currently under construction and should be published in package control soon.
ide-plugin-atom can be found here: https://atom.io/packages/modern-standard-ide-plugin-atom