Skip to content

Commit

Permalink
organize disabled rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jonataswalker committed Apr 8, 2022
1 parent 84073c0 commit a4e7ac6
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 29 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
37 changes: 37 additions & 0 deletions rules/disabled.js
Original file line number Diff line number Diff line change
@@ -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',
};
4 changes: 0 additions & 4 deletions rules/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 0 additions & 7 deletions rules/import.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
9 changes: 0 additions & 9 deletions rules/unicorn.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
2 changes: 0 additions & 2 deletions ts-for-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 0 additions & 5 deletions ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
{
Expand Down

0 comments on commit a4e7ac6

Please sign in to comment.