-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
98 lines (97 loc) · 1.95 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
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
90
91
92
93
94
95
96
97
98
const path = require('path');
module.exports = {
env: {
node: true,
browser: true,
es6: true,
jest: true,
},
globals: {
document: false,
navigator: false,
window: false,
log: false
},
"parser": 'babel-eslint',
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true
},
extends: [
'eslint:recommended',
'prettier'
],
plugins: [
"babel",
'jsx-a11y',
'prettier',
'chai-friendly',
'json',
'import',
'eslint-plugin-import-helpers',
],
rules: {
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/prefer-default-export": 0,
'import-helpers/order-imports': [
'error',
{
newlinesBetween: 'always',
groups: ['module', '/^~//', '/^@//'],
alphabetize: {
order: 'asc',
ignoreCase: false,
},
},
],
complexity: ['warn', 8],
'max-params': ['warn', 5],
'max-statements': ['warn', 15],
'max-statements-per-line': [
'error',
{
max: 1,
},
],
'max-nested-callbacks': ['warn', 4],
'max-depth': [
'warn',
{
max: 3,
},
],
'max-lines': ['warn', 400],
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
},
],
'jsx-a11y/label-has-for': 0,
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link'],
specialLink: ['to', 'hrefLeft', 'hrefRight'],
aspects: ['noHref', 'invalidHref', 'preferButton'],
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.test.jsx', '**/*.test.js', 'test/**'],
},
],
'no-unused-expressions': 0,
'chai-friendly/no-unused-expressions': 2,
},
settings: {
'import/resolver': {
node: {
paths: [path.resolve(__dirname, 'src/ui')],
},
},
},
};