diff --git a/browser.js b/browser.js index 498da1c..f018f03 100644 --- a/browser.js +++ b/browser.js @@ -2,6 +2,7 @@ module.exports = { extends: [ './configs/basic.js', './configs/babel.js', + './configs/better.js', './configs/async-await.js', './configs/dependencies.js', './configs/import.js', diff --git a/configs/better.js b/configs/better.js new file mode 100644 index 0000000..4709475 --- /dev/null +++ b/configs/better.js @@ -0,0 +1,26 @@ +module.exports = { + plugins: [ + 'better' + ], + rules: { + 'better/explicit-return': 'off', + 'better/no-classes': 'off', + 'better/no-deletes': 'off', + 'better/no-exceptions': 'off', + 'better/no-exports': 'off', + 'better/no-fors': 'error', + 'better/no-function-expressions': 'off', + 'better/no-ifs': 'off', + 'better/no-imports': 'off', + 'better/no-instanceofs': 'off', + 'better/no-new': 'off', + 'better/no-nulls': 'error', + 'better/no-reassigns': 'off', + 'better/no-switches': 'off', + 'better/no-this': 'off', + 'better/no-typeofs': 'off', + 'better/no-undefined': 'off', + 'better/no-variable-declaration': 'off', + 'better/no-whiles': 'error' + } +}; diff --git a/node.js b/node.js index a8db595..db41795 100644 --- a/node.js +++ b/node.js @@ -2,6 +2,7 @@ module.exports = { extends: [ './configs/basic.js', './configs/babel.js', + './configs/better.js', './configs/async-await.js', './configs/dependencies.js', './configs/import.js', diff --git a/package.json b/package.json index f5f6e57..d9a6f28 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "eslint": "4.1.0", "eslint-plugin-async-await": "0.0.0", "eslint-plugin-babel": "4.1.1", + "eslint-plugin-better": "0.1.5", "eslint-plugin-dependencies": "2.4.0", "eslint-plugin-import": "2.6.0", "eslint-plugin-lodash": "2.4.4",