This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
/
.eslintrc.js
76 lines (76 loc) · 2.15 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
module.exports = {
'env': {
'browser': true,
'es2021': true,
'node': true,
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
],
'parser': '@babel/eslint-parser',
'parserOptions': {
'ecmaFeatures': {
'jsx': true,
},
'ecmaVersion': 12,
'sourceType': 'module',
},
'plugins': [
'react',
],
'rules': {
'arrow-body-style': ['error', 'as-needed'],
'comma-dangle': [
'error',
{
'arrays': 'always-multiline',
'exports': 'always-multiline',
'functions': 'always-multiline',
'imports': 'always-multiline',
'objects': 'always-multiline',
},
],
'comma-spacing': 'error',
'key-spacing': 'error',
'keyword-spacing': 'error',
'no-lonely-if': 'error',
'no-unneeded-ternary': 'error',
'indent': ['error', 2],
'curly': ['error', 'all'],
'linebreak-style': ['error', 'unix'],
'no-alert': 'error',
'no-console': 'error',
'no-empty-function': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-multi-spaces': 'error',
'no-param-reassign': 'error',
'no-shadow': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'space-before-blocks': 'error',
'block-spacing': 'error',
'semi-spacing': 'error',
'object-curly-spacing': ['error', 'always'],
'quotes': ['error', 'single'],
'react/jsx-boolean-value': 'error',
'react/jsx-closing-bracket-location': 'error',
'react/jsx-closing-tag-location': 'error',
'react/jsx-curly-brace-presence': 'error',
'react/jsx-max-props-per-line': ['error', { 'maximum': 3 }],
'react/jsx-no-useless-fragment': 'error',
'react/jsx-tag-spacing': 'error',
'react/jsx-wrap-multilines': 'error',
'react/no-unused-prop-types': 'error',
'react/no-unused-state': 'error',
'react/require-default-props': 'error',
'react/default-props-match-prop-types': 'error',
'react/self-closing-comp': 'error',
'react/jsx-first-prop-new-line': 'error',
'react/jsx-indent-props': ['error', 'first'],
'semi': ['error', 'always'],
},
};