forked from starknet-io/starkgate-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
80 lines (80 loc) · 2.03 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
amd: true,
es6: true,
es2020: true,
jquery: false
},
extends: [
'eslint:recommended',
'react-app',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended'
],
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
presets: ['@babel/preset-react']
},
requireConfigFile: false,
sourceType: 'module'
},
plugins: ['@babel', 'import', 'react', 'react-hooks', 'jest', 'jsx-a11y', 'prettier'],
settings: {
'import/core-modules': [],
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'],
react: {
pragma: 'React', // Pragma to use, default to "React"
version: 'detect' // React version. "detect" automatically picks the version you have installed.
},
jest: {
// version: require('jest/package.json').version,
}
},
rules: {
'no-confusing-arrow': ['error', {allowParens: true}],
'no-console': 'warn',
'no-var': 'warn',
'no-unused-vars': 'error',
'object-shorthand': 'error',
'prefer-const': 'warn',
'prefer-template': 'warn',
'import/no-anonymous-default-export': 'off',
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',
quotes: ['error', 'single', {avoidEscape: true}],
'comma-dangle': [
'off',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore'
}
],
'react/jsx-sort-props': [
2,
{
callbacksLast: true,
shorthandFirst: true,
reservedFirst: true
}
],
'prefer-destructuring': [
'warn',
{
object: true,
array: false
}
],
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off'
}
};