-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
89 lines (89 loc) · 2.95 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
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"parser": "@babel/eslint-parser",
"extends": ["airbnb/base", "prettier", "plugin:prettier/recommended", "plugin:sonarjs/recommended"],
"plugins": ["prettier", "react", "jsx-a11y", "react-hooks", "sonarjs"],
"env": {
"jest": true,
"browser": true,
"node": true,
"es6": true
},
"globals": {
"page": true,
"browser": true,
"context": true,
"jestPuppeteer": true
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"requireConfigFile": false
},
"rules": {
"arrow-body-style": ["error", "as-needed"],
"class-methods-use-this": "off",
"comma-dangle": ["error", "always-multiline"],
"import/imports-first": "off",
"import/newline-after-import": "off",
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"import/no-named-as-default": "off",
"import/no-unresolved": "error",
"import/no-cycle": "off",
"no-underscore-dangle": "off",
"import/no-webpack-loader-syntax": "off",
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": ["error", {
"components": ["Link"],
"specialLink": ["hrefLeft", "hrefRight"],
"aspects": ["invalidHref", "preferButton"]
}],
"jsx-a11y/aria-props": "error",
"jsx-a11y/heading-has-content": "off",
"jsx-a11y/label-has-associated-control": [
"error",
{
// NOTE: If this error triggers, either disable it or add
// your custom components, labels and attributes via these options
// See https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md
"controlComponents": ["Input"]
}
],
"jsx-a11y/label-has-for": "off",
"jsx-a11y/html-has-lang": "off",
"jsx-a11y/mouse-events-have-key-events": "error",
"jsx-a11y/role-has-required-aria-props": "error",
"jsx-a11y/role-supports-aria-props": "error",
"jsx-quotes": ["error", "prefer-double"],
"max-len": "off",
"newline-per-chained-call": "off",
"no-confusing-arrow": "off",
"no-console": "warn",
"no-unused-vars": "warn",
"no-use-before-define": "off",
"no-nested-ternary": "off",
"prefer-template": "error",
"react/destructuring-assignment": "off",
"react/jsx-closing-tag-location": "off",
"react/forbid-prop-types": "off",
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-filename-extension": "off",
"react/jsx-no-target-blank": "off",
"react/jsx-uses-vars": "error",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": "off",
"react/require-extension": "off",
"react/self-closing-comp": "off",
"react/sort-comp": "off",
"require-yield": "off",
"eol-last": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"semi": ["error", "never"],
"sonarjs/cognitive-complexity": "warn"
}
}