-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
executable file
·42 lines (41 loc) · 1.33 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
module.exports = {
env: {
browser: true, // Browser global variables like `window` etc.
commonjs: true, // CommonJS global variables and CommonJS scoping.Allows require, exports and module.
es6: true, // Enable all ECMAScript 6 features except for modules.
jest: true, // Jest global variables like `it` etc.
node: true, // Defines things like process.env when generating through node
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"plugin:jest/recommended",
"plugin:testing-library/react",
"plugin:sonarjs/recommended",
],
parser: "babel-eslint", // Uses babel-eslint transforms.
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
},
plugins: ["sonarjs"],
root: true, // For configuration cascading.
rules: {
"react/prop-types": "off",
"sonarjs/cognitive-complexity": "warn",
"sonarjs/no-duplicate-string": "warn",
"jsx-a11y/click-events-have-key-events": 0,
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
"no-unused-vars": "warn"
},
settings: {
react: {
version: "detect", // Detect react version
},
},
}