diff --git a/index.js b/index.js index dd659b1..8d50564 100644 --- a/index.js +++ b/index.js @@ -2,8 +2,9 @@ const general = require('./rules/general.js'); const unicorn = require('./rules/unicorn.js'); const bestPractices = require('./rules/best-practices.js'); const importRules = require('./rules/import.js'); +const disabledRules = require('./rules/disabled.js'); -const rules = { ...general, ...unicorn, ...bestPractices, ...importRules }; +const rules = { ...general, ...unicorn, ...bestPractices, ...importRules, ...disabledRules }; /** @type {import('@typescript-eslint/utils').TSESLint.Linter.Config} */ module.exports = { diff --git a/package.json b/package.json index c1eaf74..1b5774e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-jwalker", - "version": "7.4.0", + "version": "7.5.0", "description": "Shareable framework-agnostic ESLint config", "author": "Jonatas Walker", "homepage": "https://github.com/jonataswalker/eslint-config-jwalker", diff --git a/rules/disabled.js b/rules/disabled.js new file mode 100644 index 0000000..941eabf --- /dev/null +++ b/rules/disabled.js @@ -0,0 +1,37 @@ +module.exports = { + 'func-names': 'off', + 'require-await': 'off', + 'no-return-await': 'off', + 'no-process-exit': 'off', + 'no-underscore-dangle': 'off', + 'max-lines-per-function': 'off', + + 'promise/always-return': 'off', + 'promise/no-callback-in-promise': 'off', + + 'import/exports-last': 'off', + 'import/group-exports': 'off', + 'import/no-absolute-path': 'off', + 'import/max-dependencies': 'off', + 'import/no-unused-modules': 'off', + 'import/prefer-default-export': 'off', + 'import/no-anonymous-default-export': 'off', + + 'unicorn/no-null': 'off', + 'unicorn/import-style': 'off', + 'unicorn/no-empty-file': 'off', + 'unicorn/prefer-spread': 'off', + 'unicorn/prefer-module': 'off', + 'unicorn/no-process-exit': 'off', + 'unicorn/no-array-for-each': 'off', + 'unicorn/prefer-node-protocol': 'off', + 'unicorn/no-unused-properties': 'off', + + '@typescript-eslint/return-await': 'off', + '@typescript-eslint/no-type-alias': 'off', + '@typescript-eslint/member-ordering': 'off', + '@typescript-eslint/no-restricted-imports': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', +}; diff --git a/rules/general.js b/rules/general.js index 38a1230..780997c 100644 --- a/rules/general.js +++ b/rules/general.js @@ -2,10 +2,6 @@ const cjsExport = 'cjs-export'; const cjsImport = 'cjs-import'; module.exports = { - 'func-names': 'off', - 'no-process-exit': 'off', - 'no-underscore-dangle': 'off', - 'max-lines-per-function': 'off', 'new-cap': 'error', 'sort-vars': 'error', 'prefer-const': 'error', diff --git a/rules/import.js b/rules/import.js index e57aefa..36afd6d 100644 --- a/rules/import.js +++ b/rules/import.js @@ -1,11 +1,4 @@ module.exports = { - 'import/exports-last': 'off', - 'import/group-exports': 'off', - 'import/no-absolute-path': 'off', - 'import/max-dependencies': 'off', - 'import/no-unused-modules': 'off', - 'import/prefer-default-export': 'off', - 'import/no-anonymous-default-export': 'off', 'import/named': 'error', 'import/first': 'error', 'import/export': 'error', diff --git a/rules/unicorn.js b/rules/unicorn.js index 098d184..420de1d 100644 --- a/rules/unicorn.js +++ b/rules/unicorn.js @@ -1,13 +1,4 @@ module.exports = { - 'unicorn/no-null': 'off', - 'unicorn/import-style': 'off', - 'unicorn/prefer-module': 'off', - 'unicorn/no-empty-file': 'off', - 'unicorn/prefer-spread': 'off', - 'unicorn/no-process-exit': 'off', - 'unicorn/no-array-for-each': 'off', - 'unicorn/prefer-node-protocol': 'off', - 'unicorn/no-unused-properties': 'off', 'unicorn/filename-case': ['error', { cases: { kebabCase: true, camelCase: true, pascalCase: true } }], 'unicorn/prevent-abbreviations': [ 'error', diff --git a/ts-for-js.js b/ts-for-js.js index 61d0803..45ad2f2 100644 --- a/ts-for-js.js +++ b/ts-for-js.js @@ -2,8 +2,6 @@ module.exports = { parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], rules: { - 'require-await': 'off', - 'no-return-await': 'off', '@typescript-eslint/no-this-alias': 'error', '@typescript-eslint/prefer-for-of': 'error', '@typescript-eslint/require-await': 'error', diff --git a/ts.js b/ts.js index 9ed2f47..44ee51d 100644 --- a/ts.js +++ b/ts.js @@ -10,11 +10,6 @@ module.exports = { ], plugins: ['import'], rules: { - '@typescript-eslint/no-type-alias': 'off', - '@typescript-eslint/member-ordering': 'off', - '@typescript-eslint/no-restricted-imports': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-magic-numbers': [ 'error', {