Skip to content

Commit

Permalink
Update plugins, delete old rules and configure new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
diogoazevedos committed Nov 9, 2021
1 parent c33df89 commit 84ac155
Show file tree
Hide file tree
Showing 5 changed files with 392 additions and 405 deletions.
3 changes: 3 additions & 0 deletions configs/base-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ module.exports = {
'unicorn/prefer-object-from-entries': 'error',
'unicorn/no-useless-fallback-in-spread': 'error',
'unicorn/no-invalid-remove-event-listener': 'off',
'unicorn/template-indent': 'error',
'unicorn/no-empty-file': 'error',
'unicorn/prefer-export-from': 'error',

// enable in the future
'unicorn/prefer-top-level-await': 'off',
Expand Down
15 changes: 6 additions & 9 deletions configs/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
assertFunctionNames: ['expect']
}
],
'jest/lowercase-name': ['error'],
'jest/prefer-lowercase-title': ['error'],
'jest/no-alias-methods': ['error'],
'jest/no-commented-out-tests': ['error'],
'jest/no-conditional-expect': ['error'],
Expand All @@ -40,31 +40,28 @@ module.exports = {
'jest/no-test-return-statement': ['error'],
'jest/prefer-called-with': ['error'],
'jest/prefer-strict-equal': ['error'],
'jest/prefer-to-be-null': ['error'],
'jest/prefer-to-be-undefined': ['error'],
'jest/prefer-to-be': ['error'],
'jest/prefer-to-contain': ['error'],
'jest/prefer-to-have-length': ['error'],
'jest/require-to-throw-message': ['error'],
'jest/require-top-level-describe': ['error'],
'jest/no-expect-resolves': ['off'],
'jest/no-interpolation-in-snapshots': ['off'],
'jest/no-jest-import': ['off'],
'jest/no-mocks-import': ['off'],
'jest/no-restricted-matchers': ['off'],
'jest/no-truthy-falsy': ['off'],
'jest/no-try-expect': ['off'],
'jest/prefer-expect-assertions': ['off'],
'jest/prefer-hooks-on-top': ['off'],
'jest/prefer-inline-snapshots': ['off'],
'jest/prefer-spy-on': ['off'],
'jest/prefer-todo': ['off'],
'jest/valid-describe': ['off'],
'jest/valid-describe-callback': ['off'],
'jest/valid-expect-in-promise': ['off'],
'jest/valid-expect': ['off'],
'jest/valid-title': ['off'],
'jest/no-if': ['off'],
'jest/no-done-callback': ['off'],
'jest/unbound-method': 'off',
'jest/max-nested-describe': ['error', { max: 4 }]
'jest/max-nested-describe': ['error', { max: 4 }],
'jest/prefer-expect-resolves': 'warn',
'jest/require-hook': 'warn'
}
};
6 changes: 4 additions & 2 deletions configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': ['warn'],
'@typescript-eslint/no-unsafe-member-access': ['warn'],
'@typescript-eslint/no-unsafe-return': ['warn'],
'@typescript-eslint/no-unused-vars-experimental': ['off'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/prefer-as-const': ['error'],
Expand Down Expand Up @@ -325,6 +324,9 @@ module.exports = {
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/prefer-return-this-type': 'off',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/padding-line-between-statements': 'off'
'@typescript-eslint/padding-line-between-statements': 'off',
'@typescript-eslint/no-restricted-imports': 'warn',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/consistent-type-exports': 'error'
}
};
Loading

0 comments on commit 84ac155

Please sign in to comment.