This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.js
136 lines (136 loc) · 4.09 KB
/
eslint.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'prettier/react',
],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
},
plugins: ['import', 'import-helpers', 'react-hooks', 'prettier'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'array-callback-return': 'error',
'arrow-body-style': ['error', 'as-needed'],
curly: ['error', 'all'],
'default-case': 'error',
'dot-notation': 'error',
eqeqeq: ['error', 'always'],
'global-require': 'error',
'max-classes-per-file': 'error',
'no-alert': 'error',
'no-async-promise-executor': 'error',
'no-await-in-loop': 'error',
'no-caller': 'error',
'no-case-declarations': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-div-regex': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-empty-function': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-implicit-coercion': 'error',
'no-implied-eval': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-multi-str': 'error',
'no-negated-condition': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-object': 'error',
'no-new-require': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-param-reassign': 'error',
'no-process-env': 'error',
'no-return-assign': 'error',
'no-return-await': 'error',
'no-script-url': 'error',
'no-sequences': 'error',
'no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-undefined': 'error',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'no-void': 'error',
'object-shorthand': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
'prefer-template': 'error',
'require-atomic-updates': 'error',
'require-await': 'off',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/first': 'error',
'import/named': 'error',
'import/newline-after-import': 'error',
'import/no-absolute-path': 'error',
'import/no-amd': 'error',
'import/no-commonjs': 'error',
'import/no-cycle': 'error',
'import/no-duplicates': 'error',
'import/no-dynamic-require': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-mutable-exports': 'error',
'import/no-nodejs-modules': 'error',
'import/no-self-import': 'error',
'import/no-unresolved': 'error',
'import/no-useless-path-segments': 'error',
'import-helpers/order-imports': [
'warn',
{
alphabetize: { order: 'asc' },
'newlines-between': 'never',
},
],
'react/default-props-match-prop-types': 'error',
'react/jsx-boolean-value': ['error', 'never'],
'react/jsx-filename-extension': [
'error',
{
extensions: ['.js'],
},
],
'react/jsx-fragments': ['error'],
'react/jsx-pascal-case': 'error',
'react/jsx-sort-default-props': 'error',
'react/jsx-sort-props': 'error',
'react/no-danger': 'error',
'react/no-this-in-sfc': 'error',
'react/no-typos': 'error',
'react/no-unused-prop-types': 'error',
'react/no-unused-state': 'error',
'react/prefer-es6-class': 'error',
'react/prefer-stateless-function': 'error',
'react/prop-types': 'warn',
'react/sort-prop-types': 'error',
'react/void-dom-elements-no-children': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error',
},
};