forked from MetaMask/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
88 lines (85 loc) · 2.26 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
module.exports = {
root: true,
extends: [
'@metamask/eslint-config',
'@metamask/eslint-config/config/jest',
'@metamask/eslint-config/config/nodejs',
'@metamask/eslint-config/config/typescript',
],
ignorePatterns: [
'*.js',
'!.eslintrc.js',
'!jest.config.js',
'node_modules',
'dist',
'coverage',
'*.d.ts',
],
overrides: [{
files: [
'.eslintrc.js',
'jest.config.js',
],
parserOptions: {
sourceType: 'script',
},
}],
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
// TODO re-enable most of these rules
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{
'multiline': {
'delimiter': 'semi',
'requireLast': true,
},
'singleline': {
'delimiter': 'semi',
'requireLast': false,
},
},
],
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/space-before-function-paren': [
'error',
{
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always',
},
],
'camelcase': 'off',
'consistent-return': 'off',
'default-case': 'off',
'function-paren-newline': 'off',
'guard-for-in': 'off',
'implicit-arrow-linebreak': 'off',
'import/no-anonymous-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unassigned-import': 'off',
'lines-around-comment': 'off',
'no-async-promise-executor': 'off',
'no-case-declarations': 'off',
'no-invalid-this': 'off',
'no-negated-condition': 'off',
'no-new': 'off',
'no-param-reassign': 'off',
'no-prototype-builtins': 'off',
'no-useless-escape': 'off',
'radix': 'off',
'require-atomic-updates': 'off',
'jest/expect-expect': 'off',
'jest/no-test-return-statement': 'off',
'jest/no-truthy-falsy': 'off',
'jest/no-try-expect': 'off',
'jest/prefer-strict-equal': 'off',
'jest/require-to-throw-message': 'off',
'jest/valid-expect-in-promise': 'off',
},
};