diff --git a/packages/eslint-config-airbnb-base/rules/best-practices.js b/packages/eslint-config-airbnb-base/rules/best-practices.js index 46fefab8..fa97fb68 100644 --- a/packages/eslint-config-airbnb-base/rules/best-practices.js +++ b/packages/eslint-config-airbnb-base/rules/best-practices.js @@ -176,8 +176,7 @@ module.exports = { // disallow certain object properties // http://eslint.org/docs/rules/no-restricted-properties - // TODO: enable, semver-major - 'no-restricted-properties': ['off', { + 'no-restricted-properties': ['error', { object: 'arguments', property: 'callee', message: 'arguments.callee is deprecated,' @@ -187,10 +186,6 @@ module.exports = { }, { 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 diff --git a/packages/eslint-config-airbnb-base/rules/es6.js b/packages/eslint-config-airbnb-base/rules/es6.js index efd5a15b..063ee2cf 100644 --- a/packages/eslint-config-airbnb-base/rules/es6.js +++ b/packages/eslint-config-airbnb-base/rules/es6.js @@ -109,8 +109,7 @@ module.exports = { // disallow parseInt() in favor of binary, octal, and hexadecimal literals // http://eslint.org/docs/rules/prefer-numeric-literals - // TODO: enable, semver-major - 'prefer-numeric-literals': 'off', + 'prefer-numeric-literals': 'error', // suggest using Reflect methods where applicable // http://eslint.org/docs/rules/prefer-reflect diff --git a/packages/eslint-config-airbnb-base/rules/imports.js b/packages/eslint-config-airbnb-base/rules/imports.js index b7065dd3..c4b350fc 100644 --- a/packages/eslint-config-airbnb-base/rules/imports.js +++ b/packages/eslint-config-airbnb-base/rules/imports.js @@ -107,8 +107,10 @@ module.exports = { // Ensure consistent use of file extension within the import path // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md - // TODO: enable when https://github.com/benmosher/eslint-plugin-import/issues/390 is resolved - 'import/extensions': ['off', 'never'], + 'import/extensions': ['error', 'always', { + js: 'never', + jsx: 'never', + }], // Enforce a convention in module import order // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md @@ -136,13 +138,11 @@ module.exports = { // 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'], + 'import/no-absolute-path': 'error', // 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'], + 'import/no-dynamic-require': 'error', // prevent importing the submodules of other modules // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md diff --git a/packages/eslint-config-airbnb-base/rules/style.js b/packages/eslint-config-airbnb-base/rules/style.js index 4349e135..a6617129 100644 --- a/packages/eslint-config-airbnb-base/rules/style.js +++ b/packages/eslint-config-airbnb-base/rules/style.js @@ -91,8 +91,7 @@ module.exports = { // require or disallow newlines around directives // http://eslint.org/docs/rules/lines-around-directive - // TODO: enable, semver-major - 'lines-around-directive': ['off', { + 'lines-around-directive': ['error', { before: 'always', after: 'always', }], diff --git a/packages/eslint-config-airbnb-base/test/test-base.js b/packages/eslint-config-airbnb-base/test/test-base.js index 7544a063..810c8000 100644 --- a/packages/eslint-config-airbnb-base/test/test-base.js +++ b/packages/eslint-config-airbnb-base/test/test-base.js @@ -7,6 +7,7 @@ import index from '../'; const files = { ...{ index } }; // object spread is to test parsing fs.readdirSync(path.join(__dirname, '../rules')).forEach((name) => { + // eslint-disable-next-line import/no-dynamic-require files[name] = require(`../rules/${name}`); // eslint-disable-line global-require });