Comparing version 1.3.0 to 1.4.0
@@ -14,3 +14,4 @@ #!/usr/bin/env node | ||
cwd: process.cwd(), | ||
bare: flag === '--bare' || flag === '-b', | ||
verbose: flag === '--verbose' || flag === '-v' | ||
}) |
@@ -80,2 +80,9 @@ var cp = require('child_process') | ||
if (jshintErr || jscsErr) { | ||
if (opts.bare) { | ||
errors.forEach(function (str) { | ||
console.error(str) | ||
}) | ||
return | ||
} | ||
console.error('Error: Code style check failed:') | ||
@@ -82,0 +89,0 @@ var errMap = {} |
{ | ||
"name": "standard", | ||
"description": "JavaScript Standard Style", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh", |
@@ -29,5 +29,6 @@ # JavaScript Standard Style | ||
- **Unix line breaks** (LF) | ||
- **No unused variables** (this one catches *so many* bugs and typos!) | ||
- **No semicolons** | ||
- [It's totally][1] [fine.][2] *[Really!][3]* | ||
- Never start a line with `(` or `[` | ||
- **Never start a line with `(` or `[`** | ||
- This is the **only** gotcha with omitting semicolons – *automatically checked for you!* | ||
@@ -41,5 +42,5 @@ - Always prefix with `;` like this `;[1, 2, 3].join(' ')` | ||
- `var self = this` | ||
- Checks for accidental use of [`window.self`][4] when `var self = this` is forgotten | ||
- Checks for accidental use of [`window.self`][4] when `var self = this` is omitted | ||
- Always use `===` instead of `==` | ||
- Dozens of sanity checks to catch bugs (unused variables, typos, etc.) | ||
- `obj == null` is allowed for succinctness (`obj === null || obj === undefined`) | ||
@@ -72,3 +73,3 @@ [1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding | ||
Error: Code style check failed: | ||
/Users/feross/code/webtorrent/lib/torrent.js:950:11: Expected '===' and instead saw '=='. | ||
lib/torrent.js:950:11: Expected '===' and instead saw '=='. | ||
``` | ||
@@ -97,3 +98,3 @@ | ||
Error: Code style check failed: | ||
/Users/feross/code/webtorrent/lib/torrent.js:950:11: Expected '===' and instead saw '=='. | ||
lib/torrent.js:950:11: Expected '===' and instead saw '=='. | ||
``` | ||
@@ -128,3 +129,7 @@ | ||
"standard": { | ||
"ignore": ["**/out/**", "**/lib/select2/**", "**/lib/ckeditor/**"] | ||
"ignore": [ | ||
"**/out/**", | ||
"**/lib/select2/**", | ||
"**/lib/ckeditor/**" | ||
] | ||
} | ||
@@ -137,5 +142,5 @@ ``` | ||
`standard` uses [`jshint`](http://jshint.com/) and [`jscs`](http://jscs.info/) | ||
under-the-hood and you can hide their warnings as you normally would if you used each | ||
linter directly. | ||
JavaScript Standard Style uses [`jshint`](http://jshint.com/) and | ||
[`jscs`](http://jscs.info/) under-the-hood and you can hide their warnings as you normally | ||
would if you used each linter directly. | ||
@@ -142,0 +147,0 @@ To get verbose output (so you can find the particular rule name to ignore), run: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15877
166
177