-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
76 lines (76 loc) · 2.13 KB
/
.eslintrc.cjs
File metadata and controls
76 lines (76 loc) · 2.13 KB
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 = {
root: true,
env: {
browser: true,
node: false,
jest: true,
mongo: false,
es6: true
},
plugins: ['prefer-arrow', 'ternary', 'promise', 'import', 'jsx-a11y', "@typescript-eslint"],
extends: [
'plugin:react-hooks/recommended',
'plugin:ternary/recommended',
'plugin:promise/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'eslint:recommended',
'plugin:react/recommended',
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:jsx-a11y/strict',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
impliedStrict: 'true'
},
"ecmaVersion": 12, // Версия стандарта JavaScript. Последний 12 (2021).
"sourceType": "module", // Позволяет использовать import/export
project: './tsconfig.json'
},
ignorePatterns: ['*.cjs', 'src/reportWebVitals.js', 'src/reportWebVitals.ts'],
rules: {
'no-underscore-dangle': ['error', {
allow: ['_id', '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'],
enforceInMethodNames: true,
allowAfterThis: true
}],
'jsx-quotes': ['error', 'prefer-single'],
'react/jsx-closing-bracket-location': ['error', 'after-props'],
'class-methods-use-this': ['error'],
'react/jsx-filename-extension': [1, {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}],
'react/forbid-prop-types': [0],
"react/function-component-definition": ['error', {
'namedComponents': 'arrow-function',
'unnamedComponents': 'arrow-function'
}],
'camelcase': ["error", {allow: ["^image_"]}],
'prefer-arrow/prefer-arrow-functions':
[
'warn',
{
disallowPrototype: true,
singleReturnOnly: true,
classPropertiesAllowed: false,
},
],
'default-param-last': 'off',
},
overrides: [
{
"files": ["**/*.tsx"],
"rules": {
"react/prop-types": "off"
}
}
],
}
;