-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.base.js
40 lines (40 loc) · 1.05 KB
/
.eslintrc.base.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
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: { legacyDecorators: true },
},
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['prettier', 'react-hooks'],
rules: {
'react/jsx-filename-extension': [
'error',
{
extensions: ['.js'],
},
],
'react/prop-types': ['error', { ignore: ['className', 'children'] }],
'import/imports-first': ['error', 'absolute-first'],
'import/newline-after-import': 'error',
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton'],
},
],
'no-console': 'error',
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
globals: {
window: true,
document: true,
localStorage: true,
FormData: true,
FileReader: true,
Blob: true,
navigator: true,
},
};