[eslint-v2] add new rules, disabled:

- `id-blacklist`
 - `no-extra-label`
 - `no-implicit-globals`
 - `no-restricted-imports`
 - `no-unmodified-loop-condition`
 - `no-unused-labels`
 - `sort-imports`
 - `yield-star-spacing`
This commit is contained in:
Harrison Shoff
2016-02-14 02:50:51 -08:00
committed by Jordan Harband
parent 91b83650b0
commit c05b2da9db
3 changed files with 27 additions and 3 deletions

View File

@@ -20,6 +20,9 @@ module.exports = {
'eqeqeq': 2,
// make sure for-in loops have an if statement
'guard-for-in': 2,
// Blacklist certain identifiers to prevent them being used
// http://eslint.org/docs/rules/id-blacklist
'id-blacklist': 0,
// disallow the use of alert, confirm, and prompt
'no-alert': 1,
// disallow use of arguments.caller or arguments.callee
@@ -31,8 +34,9 @@ module.exports = {
'no-div-regex': 0,
// disallow else after a return in an if
'no-else-return': 2,
// disallow use of labels for anything other then loops and switches
'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }],
// disallow Unnecessary Labels
// http://eslint.org/docs/rules/no-extra-label
'no-extra-label': 0,
// disallow comparisons to null without a type-checking operator
'no-eq-null': 0,
// disallow use of eval()
@@ -53,6 +57,8 @@ module.exports = {
'no-invalid-this': 0,
// disallow usage of __iterator__ property
'no-iterator': 2,
// disallow use of labels for anything other then loops and switches
'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }],
// disallow unnecessary nested blocks
'no-lone-blocks': 2,
// disallow creation of functions within loops
@@ -94,8 +100,14 @@ module.exports = {
'no-sequences': 2,
// restrict what can be thrown as an exception
'no-throw-literal': 2,
// disallow unmodified conditions of loops
// http://eslint.org/docs/rules/no-unmodified-loop-condition
'no-unmodified-loop-condition': 0,
// disallow usage of expressions in statement position
'no-unused-expressions': 2,
// disallow unused labels
// http://eslint.org/docs/rules/no-unused-labels
'no-unused-labels': 0,
// disallow unnecessary .call() and .apply()
'no-useless-call': 0,
// disallow use of void operator

View File

@@ -30,6 +30,9 @@ module.exports = {
'no-class-assign': 0,
// disallow modifying variables that are declared using const
'no-const-assign': 2,
// disallow specific imports
// http://eslint.org/docs/rules/no-restricted-imports
'no-restricted-imports': 0,
// disallow to use this/super before super() calling in constructors.
'no-this-before-super': 0,
// require let or const instead of var
@@ -52,6 +55,12 @@ module.exports = {
// http://eslint.org/docs/rules/prefer-template
'prefer-template': 2,
// disallow generator functions that do not have yield
'require-yield': 0
'require-yield': 0,
// import sorting
// http://eslint.org/docs/rules/sort-imports
'sort-imports': 0,
// enforce spacing around the * in yield* expressions
// http://eslint.org/docs/rules/yield-star-spacing
'yield-star-spacing': 0
}
};

View File

@@ -6,6 +6,9 @@ module.exports = {
'no-catch-shadow': 0,
// disallow deletion of variables
'no-delete-var': 2,
// disallow var and named functions in global scope
// http://eslint.org/docs/rules/no-implicit-globals
'no-implicit-globals': 0,
// disallow labels that share a name with a variable
'no-label-var': 0,
// disallow shadowing of names such as arguments