No decisions to make. No
.jscsrc files to manage. It just
This module saves you (and others!) time in two ways:
npm install uber-standard
globally as a Node command line program. To do so, simply run the following command in
your terminal (flag
standard globally on your system, omit it if you want
to install in the current working directory):
npm install uber-standard -g
After you've done that you should be able to use the
standard program. The simplest use
standard. Then, install the appropriate plugin for your editor:
This module saves you time in two ways:
standard style means ranking the importance of code clarity and community
conventions higher than personal style. This might not make sense for 100% of projects and
development cultures, however open source can be a hostile place for newbies. Setting up
clear, automated contributor expectations makes a project healthier.
No. The the whole point of
standard is to avoid bikeshedding about
style. There are lots of debates online about tabs vs. spaces, etc. that will never be
resolved. These debates just distract from getting stuff done. At the end of the day you
have to 'just pick something', and that's the whole philosophy of
standard -- its a
bunch of sensible 'just pick something' opinions. Hopefully, users see the value in that
over defending their own opinions.
Of course it's not! The style laid out here is not affiliated with any official web
standards groups, which is why this repo is called
uber/standard and not
The word "standard" has more meanings than just "web standard" :-) For example:
While most issues can be fixed, some, like not handling errors in node-style callbacks, must be fixed manually.
coverage/**, and hidden
files/folders (beginning with
.) are automatically excluded when looking for
to style check.
Sometimes you need to ignore additional folders or specific minfied files. To do that, add
standard.ignore property to
In rare cases, you'll need to break a rule and hide the warning generated by
eslint under-the-hood and you can
hide warnings as you normally would if you used
Use the eslint inline directives like:
/*eslint no-console:0*/ or
To get verbose output (so you can find the particular rule name to ignore), run:
Disable all rules on a specific line:
file = 'I know what I am doing' // eslint-disable-line
Or, disable only the
file = 'I know what I am doing' // eslint-disable-line no-use-before-define
Or, disable the
"no-use-before-define" rule for multiple lines:
/*eslint-disable no-use-before-define */// offending code here...// offending code here...// offending code here.../*eslint-enable no-use-before-define */
eslint directly if you want to configure hundreds of options individually.
Pro tip: Just use
standard and move on. There are actual real problems that you could
spend your time solving! :P
Web workers have a magic global variable called
self. In regular JS files,
won't let you use
self directly, as it wants to prevent accidental use of
standard has no way of knowing when you are in a
therefore does not know when to allow usage of
Until we figure out a better solution, we recommend adding this to the top of workers:
/* global self */
standard (as well as humans reading your code) know that
self is a global
in web worker code.
Funny you should ask!
"disallowKeywords"feature to eslint.
MIT. Copyright (c) Feross Aboukhadijeh.