-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
71 lines (66 loc) · 2.1 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
/*
copy(Array.from(document.querySelectorAll('ul li a')).filter(({ href }) => /\/rules\//.test(href)).map(({ href }) => [
`// ${href}`,
`'import/${/\/rules\/(.+)\./.exec(href)[1]}': 'error',`,
'',
].join('\n')).join('\n'));
copy(Array.from(document.querySelectorAll('table td:first-child a')).filter(({ href }) => /\/rules\//.test(href)).map(({ href }) => [
`// ${href}`,
`'jest/${/\/rules\/(.+)\./.exec(href)[1]}': 'error',`,
'',
].join('\n')).join('\n'));
copy(Array.from(document.querySelectorAll('li:nth-child(5) ul a')).filter(({ href }) => /rules-.*$/.test(href)).map(({ href }) => [
`// ${href}`,
`'jsdoc/${/rules-(.+)$/.exec(href)[1]}': 'error',`,
'',
].join('\n')).join('\n'));
copy(Array.from(document.querySelectorAll('table:first-of-type td:first-child a')).filter(({ href }) => /\/rules\//.test(href)).map(({ href }) => [
`// ${href}`,
`'@typescript-eslint/${/\/rules\/(.+)\.md/.exec(href)[1]}': 'error',`,
'',
].join('\n')).join('\n'));
copy(Array.from(document.querySelectorAll('table tr td:nth-child(3) a')).filter(({ href }) => /\/rules\//.test(href)).map(({ href }) => [
`// ${href}`,
`'${/\/rules\/(.+)$/.exec(href)[1]}': 'error',`,
'',
].join('\n')).join('\n'));
*/
module.exports = {
reportUnusedDisableDirectives: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
modules: true,
jsx: true
}
},
plugins: [
'@typescript-eslint/eslint-plugin',
'eslint-plugin-import',
'eslint-plugin-jest',
'eslint-plugin-jsdoc',
'eslint-plugin-jsx-a11y'
],
env: {
es2020: true,
browser: true,
node: true,
jest: true,
jasmine: true,
},
settings: {
'import/internal-regex': '^@k2g/',
'import/resolver': {
typescript: {}
},
jsdoc: {
mode: 'typescript',
tagNamePreference: {
returns: 'return'
}
}
}
};