-
-
Notifications
You must be signed in to change notification settings - Fork 126
/
.eslintrc.js
71 lines (63 loc) · 1.63 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
module.exports = {
root: true,
extends: ['@metamask/eslint-config'],
overrides: [
{
files: ['*.ts'],
extends: ['@metamask/eslint-config-typescript'],
rules: {
// These are disabled because this project uses both Node.js and browser
// globals and packages. In the future, we should consider removing the
// Node.js-specific packages and enabling these rules.
'no-restricted-globals': 'off',
'import/no-nodejs-modules': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'import/unambiguous': 'off',
},
},
{
files: ['*.js'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'script',
},
extends: ['@metamask/eslint-config-nodejs'],
},
{
files: ['*.test.ts', '*.test.js', 'jest.setup*.js'],
extends: [
'@metamask/eslint-config-jest',
'@metamask/eslint-config-nodejs',
],
},
{
files: ['EIP6963.test.ts', 'jest.setup.browser.js'],
rules: {
// We're mixing Node and browser environments in these files.
'no-restricted-globals': 'off',
},
},
{
files: ['jest.setup.browser.js'],
env: { browser: true },
// This file contains copypasta and we're not going to bother fixing these.
rules: {
'jest/require-top-level-describe': 'off',
'jsdoc/require-description': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-type': 'off',
},
},
],
ignorePatterns: [
'!.eslintrc.js',
'!.prettierrc.js',
'dist/',
'docs/',
'.yarn/',
],
};