[eslint config] [base] [deps] update eslint, eslint-plugin-import

- add temp disabled `func-call-spacing` rule
 - add temp disabled `no-template-curly-in-string` rule
 - enable `no-global-assign` and deprecate `no-native-reassign`
 - enable `no-unsafe-negation` and deprecate `no-negated-in-lhs`
 - add disabled `sort-keys` rule
This commit is contained in:
Jordan Harband
2016-08-12 15:36:56 -07:00
parent 0b8e466397
commit fb0f03f676
4 changed files with 29 additions and 6 deletions

View File

@@ -47,16 +47,16 @@
"devDependencies": {
"babel-preset-airbnb": "^2.0.0",
"babel-tape-runner": "^2.0.1",
"eslint": "^3.2.2",
"eslint": "^3.3.0",
"eslint-find-rules": "^1.13.0",
"eslint-plugin-import": "^1.12.0",
"eslint-plugin-import": "^1.13.0",
"in-publish": "^2.0.0",
"safe-publish-latest": "^1.0.1",
"tape": "^4.6.0"
},
"peerDependencies": {
"eslint": "^3.2.2",
"eslint-plugin-import": "^1.12.0"
"eslint": "^3.3.0",
"eslint-plugin-import": "^1.13.0"
},
"engines": {
"node": ">= 4"

View File

@@ -89,6 +89,10 @@ module.exports = {
// disallow the use of leading or trailing decimal points in numeric literals
'no-floating-decimal': 2,
// disallow reassignments of native objects or read-only globals
// http://eslint.org/docs/rules/no-global-assign
'no-global-assign': [2, { exceptions: [] }],
// disallow implicit type conversions
// http://eslint.org/docs/rules/no-implicit-coercion
'no-implicit-coercion': [0, {
@@ -136,7 +140,8 @@ module.exports = {
'no-multi-str': 2,
// disallow reassignments of native objects
'no-native-reassign': 2,
// TODO: deprecated in favor of no-global-assign
'no-native-reassign': 0,
// disallow use of new operator when not part of the assignment or comparison
'no-new': 2,

View File

@@ -64,7 +64,8 @@ module.exports = {
'no-irregular-whitespace': 2,
// disallow negation of the left operand of an in expression
'no-negated-in-lhs': 2,
// TODO: deprecated in favor of no-unsafe-negation
'no-negated-in-lhs': 0,
// disallow the use of object properties of the global object (Math and JSON) as functions
'no-obj-calls': 2,
@@ -79,6 +80,11 @@ module.exports = {
// disallow sparse arrays
'no-sparse-arrays': 2,
// Disallow template literal placeholder syntax in regular strings
// http://eslint.org/docs/rules/no-template-curly-in-string
// TODO: enable, semver-major
'no-template-curly-in-string': 0,
// Avoid code that looks like two expressions but is actually one
// http://eslint.org/docs/rules/no-unexpected-multiline
'no-unexpected-multiline': 2,
@@ -90,6 +96,10 @@ module.exports = {
// http://eslint.org/docs/rules/no-unsafe-finally
'no-unsafe-finally': 2,
// disallow negating the left operand of relational operators
// http://eslint.org/docs/rules/no-unsafe-negation
'no-unsafe-negation': 2,
// disallow comparisons with the value NaN
'use-isnan': 2,

View File

@@ -28,6 +28,11 @@ module.exports = {
// enforce newline at the end of file, with no multiple empty lines
'eol-last': 2,
// enforce spacing between functions and their invocations
// http://eslint.org/docs/rules/func-call-spacing
// TODO: enable, semver-minor
'func-call-spacing': [0, 'never'],
// require function expressions to have a name
'func-names': 1,
@@ -264,6 +269,9 @@ module.exports = {
// enforce spacing before and after semicolons
'semi-spacing': [2, { before: false, after: true }],
// requires object keys to be sorted
'sort-keys': [0, 'asc', { caseSensitive: false, natural: true }],
// sort variables within the same declaration block
'sort-vars': 0,