-
Notifications
You must be signed in to change notification settings - Fork 32
/
.eslintrc.js
63 lines (62 loc) · 1.7 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/** @type { import('eslint').Linter.Config } */
const config = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:storybook/recommended',
'plugin:import/recommended',
'prettier',
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
],
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'react/prop-types': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'no-console': 'warn',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'*.config.ts',
'**/*.config.ts',
'**/*.test.ts',
'**/*.test.tsx',
'**/*.story.tsx',
'**/_lib/**',
],
},
],
},
parserOptions: {
project: ['./tsconfig.json', './packages/**/tsconfig.json'],
},
env: {
node: true,
'jest/globals': true,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {
project: ['./tsconfig.json', './packages/**/tsconfig.json'],
},
},
},
plugins: ['jest', 'import'],
overrides: [{ files: ['*.cjs', '*.mjs'] }],
}
module.exports = config