-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
52 lines (52 loc) · 1.27 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
module.exports = {
parser: 'babel-eslint',
// Extends uses a config file which applies set of rules.
extends: ['airbnb', 'airbnb/hooks', 'plugin:prettier/recommended'],
// Plugin provides a set of rules to apply manually.
plugins: ['react', 'react-hooks', 'prettier', 'sort-imports-es6-autofix'],
// An environment defines global variables that are predefined.
env: {
browser: true,
node: true,
},
parserOptions: {
ecmaVersion: 2021,
},
settings: {
'import/resolver': {
node: {
paths: ['src'],
},
},
},
rules: {
// Js
'no-use-before-define': [
2,
{
functions: false,
},
],
'no-unused-vars': 1,
'no-debugger': 0,
// Imports
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 0,
'sort-imports-es6-autofix/sort-imports-es6': [
2,
{
ignoreCase: false,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
// React
'react-hooks/exhaustive-deps': 1,
'react/jsx-filename-extension': 0,
'react/no-array-index-key': 0,
'react/button-has-type': 0,
'react/prop-types': 1,
'react/react-in-jsx-scope': 0,
'react/jsx-props-no-spreading': 0,
},
};