eslint-config-digiteels
Advanced tools
Comparing version 1.1.1 to 1.2.0
{ | ||
"name": "eslint-config-digiteels", | ||
"description": "ESLint rule presets built and suggested by DigitEels", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"author": "DigitEels", | ||
@@ -28,4 +28,8 @@ "bugs": { | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.6.1" | ||
} | ||
} |
@@ -6,8 +6,6 @@ 'use strict'; | ||
extends: [ | ||
'digiteels/rules/es5/bestPractices', | ||
'digiteels/rules/es5/errors', | ||
'digiteels/rules/es5/es6', | ||
'digiteels/rules/es5/nodejs', | ||
'digiteels/rules/es5/stylistic', | ||
'digiteels/rules/es5/variables', | ||
'../rules/es5/bestPractices.js', | ||
'../rules/es5/errors.js', | ||
'../rules/es5/stylistic.js', | ||
'../rules/es5/variables.js', | ||
], | ||
@@ -14,0 +12,0 @@ globals: {}, |
@@ -8,8 +8,8 @@ 'use strict'; | ||
extends: [ | ||
'digiteels/presets/es5', | ||
'digiteels/rules/es6/bestPractices', | ||
'digiteels/rules/es6/errors', | ||
'digiteels/rules/es6/es6', | ||
'digiteels/rules/es6/stylistic', | ||
'digiteels/rules/es6/variables', | ||
'./es5.js', | ||
'../rules/es6/bestPractices.js', | ||
'../rules/es6/errors.js', | ||
'../rules/es6/es6.js', | ||
'../rules/es6/stylistic.js', | ||
'../rules/es6/variables.js', | ||
], | ||
@@ -16,0 +16,0 @@ parserOptions: { |
@@ -5,3 +5,3 @@ # eslint-config-digiteels | ||
[![eslint](https://img.shields.io/badge/eslint-3.5.0-brightgreen.svg)](https://github.com/eslint/eslint) | ||
[![WTFPL](https://img.shields.io/badge/license-WTFPL-blue.svg)](http://wtfpl.net/) | ||
[![WTFPL](https://img.shields.io/badge/license-WTFPL-blue.svg)](https://spdx.org/licenses/WTFPL.html) | ||
@@ -36,9 +36,26 @@ Provides ES5 and ES6 ESLint configurations based on DigitEels' recommendations about style. | ||
The following configurations are included in this package: | ||
The following full configurations are included in this package: | ||
- **ES6:** `digiteels/presets/es6` (default) | ||
- **ES5:** `digiteels/presets/es5` | ||
- **ES6:** `digiteels/presets/es6` (default) | ||
The following add-on configurations are also included and should be combined with one of the | ||
configurations above: | ||
- **Node.js:** `digiteels/presets/node` | ||
- **React:** `digiteels/presets/react` | ||
An example of a Node.js project in ES6: | ||
```json | ||
{ | ||
"extends": [ | ||
"digiteels", | ||
"digiteels/presets/node" | ||
] | ||
} | ||
``` | ||
## License | ||
Covered by the [WTFPL](http://www.wtfpl.net/), see [`LICENSE`](LICENSE) for full details. | ||
Covered by the [WTFPL](https://spdx.org/licenses/WTFPL.html), see [`LICENSE`](LICENSE) for full details. |
@@ -146,2 +146,5 @@ 'use strict'; | ||
// disallow new operators outside of assignments or comparisons | ||
'no-new': 'off', | ||
// disallow new operators with the Function object | ||
@@ -153,4 +156,4 @@ 'no-new-func': 'error', | ||
// disallow new operators outside of assignments or comparisons | ||
'no-new': 'off', | ||
// disallow octal literals | ||
'no-octal': 'error', | ||
@@ -160,5 +163,2 @@ // disallow octal escape sequences in string literals | ||
// disallow octal literals | ||
'no-octal': 'error', | ||
// disallow reassigning function parameters | ||
@@ -224,3 +224,3 @@ 'no-param-reassign': ['error', { | ||
location: 'start', | ||
terms: ['fixme', 'todo', 'xxx'] | ||
terms: ['fixme', 'todo', 'xxx'], | ||
}], | ||
@@ -227,0 +227,0 @@ |
@@ -10,3 +10,2 @@ 'use strict'; | ||
// disallow the use of console | ||
// TODO nodejs off | ||
'no-console': 'warn', | ||
@@ -34,5 +33,2 @@ | ||
// disallow empty character classes in regular expressions | ||
'no-empty-character-class': 'error', | ||
// disallow empty block statements | ||
@@ -43,2 +39,5 @@ 'no-empty': ['error', { | ||
// disallow empty character classes in regular expressions | ||
'no-empty-character-class': 'error', | ||
// disallow reassigning exceptions in catch clauses | ||
@@ -45,0 +44,0 @@ 'no-ex-assign': 'error', |
@@ -27,3 +27,2 @@ 'use strict'; | ||
// require or disallow trailing commas | ||
// TODO react 'only-multiline' | ||
'comma-dangle': ['warn', 'always-multiline'], | ||
@@ -84,3 +83,2 @@ | ||
// enforce the consistent use of either double or single quotes in JSX attributes | ||
// TODO react warn | ||
'jsx-quotes': 'off', | ||
@@ -138,2 +136,5 @@ | ||
// enforce a maximum number of statements allowed in function blocks | ||
'max-statements': 'off', | ||
// enforce a maximum number of statements allowed per line | ||
@@ -144,5 +145,2 @@ 'max-statements-per-line': ['warn', { | ||
// enforce a maximum number of statements allowed in function blocks | ||
'max-statements': 'off', | ||
// enforce newlines between operands of ternary expressions | ||
@@ -190,7 +188,7 @@ 'multiline-ternary': ['warn', 'never'], | ||
groups: [ | ||
[ '&&', '||' ], | ||
[ 'in', 'instanceof' ], | ||
[ '+', '-', '*', '/', '%', '**' ], | ||
[ '&', '|', '^', '~', '<<', '>>', '>>>' ], | ||
[ '==', '!=', '===', '!==', '>', '>=', '<', '<=' ], | ||
['&&', '||'], | ||
['in', 'instanceof'], | ||
['+', '-', '*', '/', '%', '**'], | ||
['&', '|', '^', '~', '<<', '>>', '>>>'], | ||
['==', '!=', '===', '!==', '>', '>=', '<', '<='], | ||
], | ||
@@ -266,8 +264,8 @@ }], | ||
// enforce variables to be declared either together or separately in functions | ||
'one-var': ['warn', 'never'], | ||
// require or disallow newlines around var declarations | ||
'one-var-declaration-per-line': ['warn', 'always'], | ||
// enforce variables to be declared either together or separately in functions | ||
'one-var': ['warn', 'never'], | ||
// require or disallow assignment operator shorthand where possible | ||
@@ -297,2 +295,5 @@ 'operator-assignment': ['warn', 'always'], | ||
// require or disallow semicolons instead of ASI | ||
semi: ['warn', 'always'], | ||
// enforce consistent spacing before and after semicolons | ||
@@ -304,5 +305,2 @@ 'semi-spacing': ['warn', { | ||
// require or disallow semicolons instead of ASI | ||
semi: ['warn', 'always'], | ||
// requires object keys to be sorted | ||
@@ -309,0 +307,0 @@ 'sort-keys': ['warn', 'asc', { |
@@ -21,5 +21,2 @@ 'use strict'; | ||
// disallow identifiers from shadowing restricted names | ||
'no-shadow-restricted-names': 'error', | ||
// disallow var declarations from shadowing variables in the outer scope | ||
@@ -32,4 +29,4 @@ 'no-shadow': ['error', { | ||
// disallow initializing variables to undefined | ||
'no-undef-init': 'error', | ||
// disallow identifiers from shadowing restricted names | ||
'no-shadow-restricted-names': 'error', | ||
@@ -41,2 +38,5 @@ // disallow the use of undeclared variables unless mentioned in /*global */ comments | ||
// disallow initializing variables to undefined | ||
'no-undef-init': 'error', | ||
// disallow the use of undefined as an identifier | ||
@@ -43,0 +43,0 @@ 'no-undefined': 'off', |
21
60
30752
1
823