-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
75 lines (75 loc) · 1.71 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
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:prettier/recommended',
'prettier',
],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: [
'@typescript-eslint/eslint-plugin',
'header',
'jest',
'simple-import-sort',
],
ignorePatterns: [
'.*',
'package-scripts.js',
'*.config.js',
'build',
'node_modules',
'examples',
],
overrides: [
{
files: ['**/*.{spec,test}.*'],
extends: ['plugin:jest/recommended'],
rules: {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'jest/expect-expect': [
'error',
{
assertFunctionNames: ['expect', 'request.**.expect'],
},
],
},
},
],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
curly: 'error',
eqeqeq: ['error', 'smart'],
// 'header/header': [
// 2,
// 'block',
// [
// ' This Source Code Form is subject to the terms of the Mozilla Public',
// ' * License, v. 2.0. If a copy of the MPL was not distributed with this',
// ' * file, You can obtain one at https://mozilla.org/MPL/2.0/. ',
// ],
// ],
'no-new-wrappers': 'error',
'simple-import-sort/imports': [
'error',
{
groups: [['\\u0000', '^@?\\w', '^', '\\.']],
},
],
},
};