forked from spiral/app-keeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
42 lines (42 loc) · 1.24 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
const path = require('path');
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: ["preact", "airbnb-typescript"],
env: {
"browser": true,
"node": true,
},
"parserOptions": {
"ecmaVersion": 6,
"project": "tsconfig.json"
},
rules: {
// "react/react-in-jsx-scope": 0, // Using preact here, so no
"jsx-a11y/anchor-is-valid": 0, // Many styles are applied to 'a' atm
"jsx-a11y/click-events-have-key-events": 0, // We don't support keyboard navigation yet
"jsx-a11y/no-noninteractive-element-interactions": 0, // We have lot of legacy with clicks on LI
"import/prefer-default-export": 0,
"max-len": ["error", 160],
"jsx-a11y/label-has-associated-control": [ 2, {
"required": {
"some": [ "nesting", "id" ]
}
}],
"react/static-property-placement": [2, "static public field"],
},
settings: {
'import/resolver': {
node: {
paths: [path.resolve(__dirname, 'front')],
},
},
'import/named': {
node: {
paths: [path.resolve(__dirname, 'front')],
},
},
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
};