Skip to content

Commit

Permalink
Added @typescript-eslint/consistent-type-imports eslint rule (deephav…
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Sep 19, 2024
1 parent 96e3d43 commit e990dc2
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,24 @@ module.exports = {
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'default-case': 'off', // Typescript checks for exhaustive switch/case and doesn't require a default
'consistent-return': 'off', // JS rule which complains if you don't have a default case
'no-shadow': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/default-param-last': ['error'],
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/method-signature-style': 'error',
'@typescript-eslint/no-shadow': ['error'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'error',
'no-useless-constructor': 'off',
'react/static-property-placement': ['error', 'static public field'],
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/strict-boolean-expressions': ['error'],
'consistent-return': 'off', // JS rule which complains if you don't have a default case
'default-case': 'off', // Typescript checks for exhaustive switch/case and doesn't require a default
'default-param-last': 'off',
'@typescript-eslint/default-param-last': ['error'],
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/method-signature-style': 'error',
// `no-return-await` needs to be disabled when enabling `@typescript-eslint/return-await`
// to avoid incorrectly reporting errors
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
'no-shadow': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
'react/static-property-placement': ['error', 'static public field'],
},
},
{
Expand Down

0 comments on commit e990dc2

Please sign in to comment.