standard
Advanced tools
Comparing version 8.0.0-beta.2 to 8.0.0-beta.3
@@ -67,3 +67,4 @@ # Authors | ||
- David Moseley <davidmoseley@gmail.com> | ||
- Timon van Spronsen <timonvanspronsen@outlook.com> | ||
#### Generated by bin/update-authors.sh. |
{ | ||
"name": "standard", | ||
"description": "JavaScript Standard Style", | ||
"version": "8.0.0-beta.2", | ||
"version": "8.0.0-beta.3", | ||
"author": { | ||
@@ -16,17 +16,17 @@ "email": "feross@feross.org", | ||
"eslint": "~3.1.1", | ||
"eslint-config-standard": "6.0.0-beta.1", | ||
"eslint-config-standard": "6.0.0-beta.2", | ||
"eslint-config-standard-jsx": "2.0.0", | ||
"eslint-plugin-promise": "^2.0.0", | ||
"eslint-plugin-react": "^5.0.1", | ||
"eslint-plugin-react": "^5.2.2", | ||
"eslint-plugin-standard": "^2.0.0", | ||
"standard-engine": "^4.1.0" | ||
"standard-engine": "^4.1.1" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "^6.0.0", | ||
"babel-eslint": "^6.1.2", | ||
"cross-spawn": "^4.0.0", | ||
"minimist": "^1.2.0", | ||
"mkdirp": "^0.5.1", | ||
"run-parallel-limit": "^1.0.2", | ||
"standard-packages": "^3.0.5", | ||
"tape": "^4.4.0" | ||
"run-parallel-limit": "^1.0.3", | ||
"standard-packages": "^3.1.9", | ||
"tape": "^4.6.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "homepage": "http://standardjs.com", |
157
README.md
<h1 align="center"> | ||
<br> | ||
<a href="http://standardjs.com"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard" width="200"></a> | ||
<a href="http://standardjs.com"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="JavaScript Style Guide - JavaScript Standard Style" width="200"></a> | ||
<br> | ||
@@ -23,6 +23,6 @@ JavaScript Standard Style | ||
- **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. | ||
- **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. | ||
@@ -84,6 +84,6 @@ ## Install | ||
The easiest way to use JavaScript Standard Style to check your code is to install it | ||
globally as a Node command line program. To do so, simply run the following command in | ||
your terminal (flag `-g` installs `standard` globally on your system, omit it if you want | ||
to install in the current working directory): | ||
The easiest way to use JavaScript Standard Style to check your code is to install | ||
it globally as a Node command line program. To do so, simply run the following | ||
command in your terminal (flag `-g` installs `standard` globally on your system, | ||
omit it if you want to install in the current working directory): | ||
@@ -94,4 +94,5 @@ ```bash | ||
After you've done that you should be able to use the `standard` program. The simplest use | ||
case would be checking the style of all JavaScript files in the current working directory: | ||
After you've done that you should be able to use the `standard` program. The | ||
simplest use case would be checking the style of all JavaScript files in the | ||
current working directory: | ||
@@ -104,3 +105,5 @@ ```bash | ||
You can optionally pass in a directory (or directories) using the glob pattern. Be sure to quote paths containing glob patterns so that they are expanded by standard instead of your shell: | ||
You can optionally pass in a directory (or directories) using the glob pattern. Be | ||
sure to quote paths containing glob patterns so that they are expanded by standard | ||
instead of your shell: | ||
@@ -111,3 +114,4 @@ ```bash | ||
**Note:** by default `standard` will look for all files matching the patterns: `**/*.js`, `**/*.jsx`. | ||
**Note:** by default `standard` will look for all files matching the patterns: | ||
`**/*.js`, `**/*.jsx`. | ||
@@ -134,4 +138,4 @@ ### Text editor plugins | ||
For automatic formatting, install **[standard-formatter][atom-2]**. | ||
For snippets, install **[standardjs-snippets][atom-3]**. | ||
For automatic formatting, install **[standard-formatter][atom-2]**. For snippets, | ||
install **[standardjs-snippets][atom-3]**. | ||
@@ -167,4 +171,4 @@ [atom-1]: https://atom.io/packages/linter-js-standard | ||
Install **[Flycheck][emacs-1]** and check out the **[manual][emacs-2]** to learn how to | ||
enable it in your projects. | ||
Install **[Flycheck][emacs-1]** and check out the **[manual][emacs-2]** to learn | ||
how to enable it in your projects. | ||
@@ -184,6 +188,8 @@ [emacs-1]: http://www.flycheck.org | ||
For automatic formatting, install **[vscode-standard-format][vscode-2]**. | ||
For automatic formatting, install **[vscode-standard-format][vscode-2]**. For React | ||
snippets, install **[vscode-react-standard](vscode-3)**. | ||
[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs | ||
[vscode-2]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standard-format | ||
[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard | ||
@@ -227,17 +233,18 @@ #### [WebStorm/PhpStorm][webstorm-1] | ||
The beauty of JavaScript Standard Style is that it's simple. No one wants to maintain | ||
multiple hundred-line style configuration files for every module/project they work on. | ||
Enough of this madness! | ||
The beauty of JavaScript Standard Style is that it's simple. No one wants to | ||
maintain multiple hundred-line style configuration files for every module/project | ||
they work on. Enough of this madness! | ||
This module saves you 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. | ||
- **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. | ||
Adopting `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. | ||
Adopting `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. | ||
@@ -247,7 +254,7 @@ ### I disagree with rule X, can you change it? | ||
No. The whole point of `standard` is to avoid [bikeshedding][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. | ||
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. | ||
@@ -269,5 +276,7 @@ [bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting | ||
Yes! you can install [Max Ogden][max]'s [`standard-format`][standard-format] module with `npm install -g standard-format`. | ||
Yes! you can install [Max Ogden][max]'s [`standard-format`][standard-format] module | ||
with `npm install -g standard-format`. | ||
`standard-format filename.js` will automatically fix most issues though some, like not handling errors in node-style callbacks, must be fixed manually. | ||
`standard-format filename.js` will automatically fix most issues though some, | ||
like not handling errors in node-style callbacks, must be fixed manually. | ||
@@ -279,8 +288,8 @@ [max]: https://github.com/maxogden | ||
The paths `node_modules/**`, `*.min.js`, `bundle.js`, `coverage/**`, hidden files/folders | ||
(beginning with `.`), and all patterns in a project's root `.gitignore` file are | ||
automatically ignored. | ||
The paths `node_modules/**`, `*.min.js`, `bundle.js`, `coverage/**`, hidden | ||
files/folders (beginning with `.`), and all patterns in a project's root | ||
`.gitignore` file are automatically ignored. | ||
Sometimes you need to ignore additional folders or specific minified files. To do that, add | ||
a `standard.ignore` property to `package.json`: | ||
Sometimes you need to ignore additional folders or specific minified files. To do | ||
that, add a `standard.ignore` property to `package.json`: | ||
@@ -300,6 +309,7 @@ ```json | ||
In rare cases, you'll need to break a rule and hide the warning generated by `standard`. | ||
In rare cases, you'll need to break a rule and hide the warning generated by | ||
`standard`. | ||
JavaScript Standard Style uses [`eslint`](http://eslint.org/) under-the-hood and you can | ||
hide warnings as you normally would if you used `eslint` directly. | ||
JavaScript Standard Style uses [`eslint`](http://eslint.org/) under-the-hood and | ||
you can hide warnings as you normally would if you used `eslint` directly. | ||
@@ -338,10 +348,10 @@ To get verbose output (so you can find the particular rule name to ignore), run: | ||
Some packages (e.g. `mocha`) put their functions (e.g. `describe`, `it`) on the global | ||
object (poor form!). Since these functions are not defined or `require`d anywhere in your | ||
code, `standard` will warn that you're using a variable that is not defined (usually, this | ||
rule is really useful for catching typos!). But we want to disable it for these global | ||
variables. | ||
Some packages (e.g. `mocha`) put their functions (e.g. `describe`, `it`) on the | ||
global object (poor form!). Since these functions are not defined or `require`d | ||
anywhere in your code, `standard` will warn that you're using a variable that is | ||
not defined (usually, this rule is really useful for catching typos!). But we want | ||
to disable it for these global variables. | ||
To let `standard` (as well as humans reading your code) know that certain variables are | ||
global in your code, add this to the top of your file: | ||
To let `standard` (as well as humans reading your code) know that certain variables | ||
are global in your code, add this to the top of your file: | ||
@@ -352,4 +362,4 @@ ``` | ||
If you have hundreds of files, adding comments to every file can be tedious. In these | ||
cases, you can add this to `package.json`: | ||
If you have hundreds of files, adding comments to every file can be tedious. In | ||
these cases, you can add this to `package.json`: | ||
@@ -377,17 +387,17 @@ ```json | ||
If you're using `standard` globally (you installed it with `-g`), then you also need to | ||
install `babel-eslint` globally with `npm install babel-eslint -g`. | ||
If you're using `standard` globally (you installed it with `-g`), then you also | ||
need to install `babel-eslint` globally with `npm install babel-eslint -g`. | ||
### Can you make rule X configurable? | ||
No. The point of `standard` is to save you time by picking reasonable rules so you can | ||
spend your time solving actual problems. If you really do want to configure hundreds of | ||
eslint rules individually, you can always use `eslint` directly. | ||
No. The point of `standard` is to save you time by picking reasonable rules so you | ||
can spend your time solving actual problems. If you really do want to configure | ||
hundreds of eslint rules individually, you can always use `eslint` directly. | ||
If you just want to tweak a couple rules, consider using | ||
[this shareable config](https://github.com/feross/eslint-config-standard) and layering | ||
your changes on top. | ||
[this shareable config](https://github.com/feross/eslint-config-standard) and | ||
layering your changes on top. | ||
Pro tip: Just use `standard` and move on. There are actual real problems that you could | ||
spend your time solving! :P | ||
Pro tip: Just use `standard` and move on. There are actual real problems that you | ||
could spend your time solving! :P | ||
@@ -402,4 +412,4 @@ ### What about Web Workers? | ||
This lets `standard` (as well as humans reading your code) know that `self` is a global | ||
in web worker code. | ||
This lets `standard` (as well as humans reading your code) know that `self` is a | ||
global in web worker code. | ||
@@ -414,6 +424,9 @@ ### What about Mocha, Jasmine, QUnit, etc? | ||
Where `mocha` can be one of `jasmine`, `qunit`, `phantomjs`, and so on. To see a full list, | ||
check ESLint's [specifying environments](http://eslint.org/docs/user-guide/configuring.html#specifying-environments) | ||
documentation. For a list of what globals are available for these environments, check | ||
the [globals](https://github.com/sindresorhus/globals/blob/master/globals.json) npm module. | ||
Where `mocha` can be one of `jasmine`, `qunit`, `phantomjs`, and so on. To see a | ||
full list, check ESLint's | ||
[specifying environments](http://eslint.org/docs/user-guide/configuring.html#specifying-environments) | ||
documentation. For a list of what globals are available for these environments, | ||
check the | ||
[globals](https://github.com/sindresorhus/globals/blob/master/globals.json) npm | ||
module. | ||
@@ -456,3 +469,5 @@ ### Is there a Git `pre-commit` hook? | ||
There's also [standard-tap](https://www.npmjs.com/package/standard-tap), [standard-json](https://www.npmjs.com/package/standard-json), [standard-reporter](https://www.npmjs.com/package/standard-reporter), and | ||
There's also [standard-tap](https://www.npmjs.com/package/standard-tap), | ||
[standard-json](https://www.npmjs.com/package/standard-json), | ||
[standard-reporter](https://www.npmjs.com/package/standard-reporter), and | ||
[standard-summary](https://www.npmjs.com/package/standard-summary). | ||
@@ -473,4 +488,4 @@ | ||
There are also many **[editor plugins](#text-editor-plugins)**, a list of | ||
**[npm packages that use `standard`](https://github.com/feross/standard-packages)**, and | ||
an awesome list of | ||
**[npm packages that use `standard`](https://github.com/feross/standard-packages)**, | ||
and an awesome list of | ||
**[packages in the `standard` ecosystem](https://github.com/feross/awesome-standard)**. | ||
@@ -477,0 +492,0 @@ |
59778
528
+ Addedeslint-config-standard@6.0.0-beta.2(transitive)
- Removedeslint-config-standard@6.0.0-beta.1(transitive)
Updatedeslint-plugin-react@^5.2.2
Updatedstandard-engine@^4.1.1