-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
76 lines (70 loc) · 2.05 KB
/
.eslintrc
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
/*
npm i -D eslint \
babel-eslint \
eslint-plugin-react \
eslint-plugin-import \
eslint eslint-plugin-jsx-a11y \
eslint-plugin-react-hooks \
eslint-config-airbnb \
eslint-config-prettier
*/
{
"root": true,
"parser": "babel-eslint",
"extends": [
// https://eslint.org/docs/rules/
"eslint:recommended",
// https://github.com/yannickcr/eslint-plugin-react
"plugin:react/recommended",
// https://github.com/benmosher/eslint-plugin-import
"plugin:import/errors",
"plugin:import/warnings",
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y
"plugin:jsx-a11y/recommended",
// https://www.npmjs.com/package/eslint-plugin-react-hooks
"plugin:react-hooks/recommended",
// https://github.com/airbnb/javascript
"airbnb",
// turns off all rules that are unnecessary or might conflict with Prettier.
// https://github.com/prettier/eslint-plugin-prettier
"prettier"
],
// https://eslint.org/docs/user-guide/configuring/language-options
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"import/no-unresolved": "off",
"jsx-quotes":["error", "prefer-double"],
"quotes": ["error", "single"],
// alow unary ++ and -- in the end of loops
"no-plusplus": [2, { "allowForLoopAfterthoughts": true }],
// "object-property-newline": [2, {"allowMultiplePropertiesPerLine": false}],
// alow unused vars in function arguments
"no-unused-vars": ["error", { "args": "none" }],
"react/prop-types": 0,
"prefer-template": 0,
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
"one-var": "off",
// for next.js a tags inside Link
"jsx-a11y/anchor-is-valid": 0,
// allow jsx syntax in js files
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts"] }]
}
}