mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 03:28:02 -05:00
[eslint config] [base] [deps] update eslint, eslint-plugin-import
This commit is contained in:
@@ -44,13 +44,13 @@
|
||||
"homepage": "https://github.com/airbnb/javascript",
|
||||
"devDependencies": {
|
||||
"babel-tape-runner": "^1.3.1",
|
||||
"eslint": "^2.8.0",
|
||||
"eslint": "^2.9.0",
|
||||
"eslint-find-rules": "^1.7.0",
|
||||
"eslint-plugin-import": "^1.6.0",
|
||||
"eslint-plugin-import": "^1.6.1",
|
||||
"tape": "^4.5.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^2.8.0",
|
||||
"eslint-plugin-import": "^1.6.0"
|
||||
"eslint": "^2.9.0",
|
||||
"eslint-plugin-import": "^1.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = {
|
||||
// specify curly brace conventions for all control statements
|
||||
'curly': [2, 'multi-line'],
|
||||
// require default case in switch statements
|
||||
'default-case': 2,
|
||||
'default-case': [2, { 'commentPattern': '^no default$' }],
|
||||
// encourages use of dot notation whenever possible
|
||||
'dot-notation': [2, { 'allowKeywords': true }],
|
||||
// enforces consistent newlines before or after dots
|
||||
@@ -136,6 +136,10 @@ module.exports = {
|
||||
// disallow unmodified conditions of loops
|
||||
// http://eslint.org/docs/rules/no-unmodified-loop-condition
|
||||
'no-unmodified-loop-condition': 0,
|
||||
// disallow return/throw/break/continue inside finally blocks
|
||||
// http://eslint.org/docs/rules/no-unsafe-finally
|
||||
// TODO: enable
|
||||
'no-unsafe-finally': 0,
|
||||
// disallow usage of expressions in statement position
|
||||
'no-unused-expressions': 2,
|
||||
// disallow unused labels
|
||||
|
||||
@@ -55,6 +55,10 @@ module.exports = {
|
||||
'no-this-before-super': 0,
|
||||
// require let or const instead of var
|
||||
'no-var': 2,
|
||||
// disallow useless computed property keys
|
||||
// http://eslint.org/docs/rules/no-useless-computed-key
|
||||
// TODO: enable
|
||||
'no-useless-computed-key': 0,
|
||||
// disallow unnecessary constructor
|
||||
// http://eslint.org/docs/rules/no-useless-constructor
|
||||
'no-useless-constructor': 2,
|
||||
@@ -62,7 +66,10 @@ module.exports = {
|
||||
// http://eslint.org/docs/rules/object-shorthand
|
||||
'object-shorthand': [2, 'always'],
|
||||
// suggest using arrow functions as callbacks
|
||||
'prefer-arrow-callback': 2,
|
||||
'prefer-arrow-callback': [2, {
|
||||
'allowNamedFunctions': false,
|
||||
'allowUnboundThis': true,
|
||||
}],
|
||||
// suggest using of const declaration for variables that are never modified after declared
|
||||
'prefer-const': 2,
|
||||
// suggest using the spread operator instead of .apply()
|
||||
|
||||
Reference in New Issue
Block a user