-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
59 lines (59 loc) · 1.43 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs', '!src/**', '__generated__/schema.tsx', 'fileTransformer.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
tsx: true,
},
project: './tsconfig.json',
},
plugins: ['react-refresh', '@typescript-eslint', 'jest'],
rules: {
'no-underscore-dangle': 0,
'import/extensions': [
'error',
'ignorePackages',
{
ts: 'always',
tsx: 'always',
},
],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'vite.config.ts',
'test.{ts,tsx}',
'test-*.{ts,tsx}',
'**/*{.,_}{test,spec}.{ts,tsx}',
'**/jest.config.ts',
'**/jest.setup.ts',
'codegen.ts',
'lint-staged.config.ts'
],
},
],
'react/require-default-props': 'off',
'import/extensions': 'off',
},
}