This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
forked from Draglon/Template_react_webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
75 lines (67 loc) · 2.29 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
module.exports = {
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"node": true,
},
"extends": [
"eslint:recommended",
"airbnb",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jest/recommended",
"jest-enzyme",
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true,
},
"ecmaVersion": 2018,
"sourceType": "module",
},
"plugins": [
'babel',
'import',
'jsx-a11y',
'react',
'prettier',
],
rules: {
'linebreak-style': 'off', // с Windows работает плохо
'arrow-parens': 'off', // несовместимо с prettier
'object-curly-newline': 'off', // несовместимо с prettier
'no-mixed-operators': 'off', // несовместимо с prettier
'arrow-body-style': 'off',
'function-paren-newline': 'off', // несовместимо с prettier
'no-plusplus': 'off',
'space-before-function-paren': 0, // несовместимо с prettier
'max-len': ['error', 100, 2, { ignoreUrls: true, }],
'no-console': 'error', // airbnb использует warn
'no-alert': 'error', // airbnb использует warn
'no-param-reassign': 'off',
"radix": "off",
'react/require-default-props': 'off', // airbnb использует error
'react/forbid-prop-types': 'off', // airbnb использует error
'react/jsx-filename-extension': 0,//[1, { 'extension': ['.js', '.jsx'] }], // airbnb is использует .jsx
'react/prefer-stateless-function': 'off',
'react/prop-types': 'off',
'import/namespace': 'off',
'import/prefer-default-export': 'off',
'prefer-destructuring': 'off',
'react/no-find-dom-node': 'off',
'react/no-did-mount-set-state': 'off',
'react/no-unused-prop-types': 'off',
'react/jsx-one-expression-per-line': 'off',
'jsx-a11y/anchor-is-valid': ["error", { "components": ["Link"], "specialLink": ["to"] }],
'jsx-a11y/label-has-for': [2, { "required": { "every": ["id"] } }],
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'prettier/prettier': ['error'],
},
};