-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy path.eslintrc.js
More file actions
56 lines (56 loc) · 2.03 KB
/
.eslintrc.js
File metadata and controls
56 lines (56 loc) · 2.03 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
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
rules: {
"jsx-a11y/alt-text": 1,
"jsx-a11y/aria-role": 1,
"jsx-a11y/aria-unsupported-elements": 1,
curly: 2,
"eol-last": 2,
"jsx-a11y/heading-has-content": 1,
"jsx-a11y/html-has-lang": 1,
"jsx-a11y/iframe-has-title": 1,
"jsx-a11y/img-redundant-alt": 1,
"jsx-a11y/interactive-supports-focus": 1,
"jsx-a11y/label-has-associated-control": 1,
"jsx-a11y/lang": 1,
"jsx-a11y/mouse-events-have-key-events": 1,
"no-duplicate-imports": 2,
"no-lonely-if": 2,
"no-multiple-empty-lines": 2,
"no-nested-ternary": 2,
"jsx-a11y/no-redundant-roles": 1,
"no-trailing-spaces": 2,
"no-var": 2,
"object-curly-newline": 2,
"object-property-newline": 2,
"jsx-a11y/role-has-required-aria-props": 1,
"jsx-a11y/role-supports-aria-props": 1,
semi: 2,
"sort-keys": 2,
"jsx-a11y/tabindex-no-positive": 1,
"react/prop-types": 0,
"@typescript-eslint/no-explicit-any": "off"
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
plugins: [
"jsx-a11y"
]
};