Created
February 15, 2022 14:53
-
-
Save jpzwarte/a67f2288a3287b58a0dde1b5325bcef1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
env: { | |
browser: true | |
}, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
tsconfigRootDir: __dirname, | |
project: ['./tsconfig.json'] | |
}, | |
plugins: ['@typescript-eslint', 'unused-imports'], | |
extends: [ | |
'eslint:recommended', | |
'plugin:@typescript-eslint/recommended', | |
'plugin:@typescript-eslint/recommended-requiring-type-checking', | |
'plugin:import/errors', | |
'plugin:import/warnings', | |
'plugin:import/typescript', | |
'plugin:prettier/recommended', | |
'plugin:storybook/recommended' | |
], | |
rules: { | |
'@typescript-eslint/array-type': [ | |
'error', | |
{ | |
default: 'array-simple' | |
} | |
], | |
'@typescript-eslint/consistent-type-exports': 'error', | |
'@typescript-eslint/consistent-type-imports': [ | |
'error', | |
{ | |
prefer: 'type-imports' | |
} | |
], | |
'@typescript-eslint/explicit-function-return-type': [ | |
'error', | |
{ | |
allowExpressions: true | |
} | |
], | |
'@typescript-eslint/no-explicit-any': [ | |
'error', | |
{ | |
ignoreRestArgs: true | |
} | |
], | |
'@typescript-eslint/no-misused-promises': [ | |
'error', | |
{ | |
checksConditionals: false | |
} | |
], | |
'@typescript-eslint/no-unsafe-return': 'off', | |
'@typescript-eslint/no-unused-vars': 'off', | |
'@typescript-eslint/prefer-for-of': 'error', | |
'@typescript-eslint/prefer-optional-chain': 'error', | |
'@typescript-eslint/promise-function-async': 'error', | |
'@typescript-eslint/require-await': 'off', | |
'@typescript-eslint/unbound-method': 'off', | |
'import/extensions': [ | |
'error', | |
'ignorePackages', | |
{ | |
ts: 'never' | |
} | |
], | |
'import/named': 'off', | |
'import/no-unresolved': 'error', | |
'import/order': [ | |
'error', | |
{ | |
groups: ['type', 'builtin', 'external', 'parent', 'sibling', 'index'], | |
pathGroups: [ | |
{ | |
pattern: '@*/**', | |
group: 'external', | |
position: 'before' | |
} | |
], | |
pathGroupsExcludedImportTypes: ['builtin'] | |
} | |
], | |
'import/prefer-default-export': 'off', | |
'import/no-unresolved': 'off', | |
'no-empty': [ | |
'error', | |
{ | |
allowEmptyCatch: true | |
} | |
], | |
'sort-imports': [ | |
'error', | |
{ | |
ignoreDeclarationSort: true | |
} | |
], | |
'unused-imports/no-unused-imports': 'error', | |
'unused-imports/no-unused-vars': [ | |
'error', | |
{ | |
args: 'after-used', | |
argsIgnorePattern: '^_', | |
vars: 'all', | |
varsIgnorePattern: '^_' | |
} | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment