eslint-config-airbnb-base
Advanced tools
Comparing version 7.1.0 to 7.2.0
@@ -0,1 +1,7 @@ | ||
7.2.0 / 2016-09-23 | ||
================== | ||
- [new] set `ecmaVersion` to 2017; enable object rest/spread; update `babel-preset-airbnb` | ||
- [patch] fix category of `no-restricted-properties` | ||
- [deps] update `eslint`, `eslint-plugin-import`, `eslint-find-rules`, `safe-publish-latest` | ||
7.1.0 / 2016-09-11 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -12,8 +12,11 @@ module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2016, | ||
ecmaVersion: 2017, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
experimentalObjectRestSpread: true, | ||
}, | ||
}, | ||
rules: { | ||
strict: 'error', | ||
} | ||
}, | ||
}; |
{ | ||
"name": "eslint-config-airbnb-base", | ||
"version": "7.1.0", | ||
"version": "7.2.0", | ||
"description": "Airbnb's base JS ESLint config, following our styleguide", | ||
@@ -48,14 +48,14 @@ "main": "index.js", | ||
"devDependencies": { | ||
"babel-preset-airbnb": "^2.0.0", | ||
"babel-preset-airbnb": "^2.1.0", | ||
"babel-tape-runner": "^2.0.1", | ||
"eslint": "^3.5.0", | ||
"eslint-find-rules": "^1.13.1", | ||
"eslint-plugin-import": "^1.14.0", | ||
"eslint": "^3.6.0", | ||
"eslint-find-rules": "^1.13.2", | ||
"eslint-plugin-import": "^1.16.0", | ||
"in-publish": "^2.0.0", | ||
"safe-publish-latest": "^1.0.1", | ||
"safe-publish-latest": "^1.1.0", | ||
"tape": "^4.6.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^3.5.0", | ||
"eslint-plugin-import": "^1.14.0" | ||
"eslint": "^3.6.0", | ||
"eslint-plugin-import": "^1.16.0" | ||
}, | ||
@@ -62,0 +62,0 @@ "engines": { |
@@ -18,3 +18,5 @@ module.exports = { | ||
// http://eslint.org/docs/rules/class-methods-use-this | ||
'class-methods-use-this': 'error', | ||
'class-methods-use-this': ['error', { | ||
exceptMethods: [], | ||
}], | ||
@@ -176,2 +178,21 @@ // require return statements to either always or never specify values | ||
// disallow certain object properties | ||
// http://eslint.org/docs/rules/no-restricted-properties | ||
// TODO: enable, semver-major | ||
'no-restricted-properties': ['off', { | ||
object: 'arguments', | ||
property: 'callee', | ||
message: 'arguments.callee is deprecated,' | ||
}, { | ||
property: '__defineGetter__', | ||
message: 'Please use Object.defineProperty instead.', | ||
}, { | ||
property: '__defineSetter__', | ||
message: 'Please use Object.defineProperty instead.', | ||
}, { | ||
object: 'Object', | ||
property: 'assign', | ||
message: 'Please use the object spread operator (...) instead.', | ||
}], | ||
// disallow use of assignment in return statement | ||
@@ -178,0 +199,0 @@ 'no-return-assign': 'error', |
@@ -132,3 +132,23 @@ module.exports = { | ||
'import/no-restricted-paths': 'off', | ||
// Forbid modules to have too many dependencies | ||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md | ||
'import/max-dependencies': ['off', { max: 10 }], | ||
// Forbid import of modules using absolute paths | ||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md | ||
// TODO: enable, semver-major | ||
'import/no-absolute-path': ['off'], | ||
// Forbid require() calls with expressions | ||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md | ||
// TODO: enable, semver-major | ||
'import/no-dynamic-require': ['off'], | ||
// prevent importing the submodules of other modules | ||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md | ||
'import/no-internal-modules': ['off', { | ||
allow: [], | ||
}], | ||
}, | ||
}; |
@@ -36,11 +36,2 @@ module.exports = { | ||
// disallow certain object properties | ||
// http://eslint.org/docs/rules/no-restricted-properties | ||
// TODO: enable, semver-major | ||
'no-restricted-properties': ['off', { | ||
object: 'arguments', | ||
property: 'callee', | ||
message: 'arguments.callee is deprecated,' | ||
}], | ||
// disallow use of synchronous methods (off by default) | ||
@@ -47,0 +38,0 @@ 'no-sync': 'off', |
@@ -29,3 +29,3 @@ module.exports = { | ||
// enforce newline at the end of file, with no multiple empty lines | ||
'eol-last': 'error', | ||
'eol-last': ['error', 'always'], | ||
@@ -32,0 +32,0 @@ // enforce spacing between functions and their invocations |
@@ -7,3 +7,3 @@ import fs from 'fs'; | ||
const files = { index }; | ||
const files = { ...{ index } }; // object spread is to test parsing | ||
@@ -14,3 +14,5 @@ fs.readdirSync(path.join(__dirname, '../rules')).forEach((name) => { | ||
Object.keys(files).forEach((name) => { | ||
Object.keys(files).forEach(( | ||
name, // trailing function comma is to test parsing | ||
) => { | ||
const config = files[name]; | ||
@@ -17,0 +19,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
47920
919