-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
116 lines (115 loc) · 2.53 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
module.exports = {
env: {
browser: true
},
extends: [
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'prettier',
'next/core-web-vitals',
'next'
],
parserOptions: {
project: './tsconfig.json'
},
plugins: [
'react',
'@typescript-eslint',
'prettier',
'import',
'testing-library'
],
rules: {
'@typescript-eslint/naming-convention': 'off',
/* NOTE: https://github.com/facebook/create-react-app/pull/8177 */
'@typescript-eslint/ban-types': [
'error',
{
types: {
'React.FC': null
}
}
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: ['variable'],
format: ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE']
}
],
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
'newlines-between': 'always',
pathGroups: [
{
pattern: '~/**',
group: 'internal'
}
]
}
],
'no-param-reassign': ['error', { props: false }],
'prettier/prettier': 'error',
'react/jsx-props-no-spreading': 'off',
/* NOTE: https://github.com/yannickcr/eslint-plugin-react/issues/2396 */
'react/require-default-props': 'off',
'react/display-name': ['off'],
'@typescript-eslint/no-floating-promises': ['off'],
'jsx-a11y/anchor-is-valid': ['off']
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
paths: './tsconfig.json'
}
},
react: {
pragma: 'React',
version: 'detect'
}
},
overrides: [
{
files: ['./cypress/**/*.{ts,tsx}'],
extends: [
'plugin:mocha/recommended',
'plugin:cypress/recommended',
'plugin:chai-friendly/recommended',
'plugin:testing-library/react'
],
parserOptions: {
project: ['./cypress/tsconfig.json']
},
rules: {}
},
{
env: {
jest: true
},
files: ['./jest/**/*.{ts,tsx}'],
extends: [
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:testing-library/react'
],
parserOptions: {
project: ['./jest/tsconfig.json']
}
}
]
}