-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
60 lines (58 loc) · 1.82 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
// Copyright (c) 2024 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
const headerArray = [
{
pattern:
'^ Copyright \\(c\\) [2][0-9]{3}([-][2][0-9]{3})? The Bitcoin developers$',
template: ` Copyright (c) ${new Date().getFullYear()} The Bitcoin developers`,
},
' Distributed under the MIT software license, see the accompanying',
' file COPYING or http://www.opensource.org/licenses/mit-license.php.',
];
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:jest/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['etc', 'react', 'jest', 'testing-library', 'header'],
rules: {
'jest/no-mocks-import': 'off',
'react/prop-types': 'off',
'no-unused-vars': 'off',
'react/no-unknown-property': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-ex-assign': 'off',
'no-useless-catch': 'off',
'react/no-deprecated': 'off',
'no-empty': 'off',
'no-useless-escape': 'off',
},
settings: { react: { version: 'detect' } },
overrides: [
{
// Enable eslint-plugin-testing-library rules or preset only for matching testing files!
files: [
'**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)',
],
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/no-node-access': 'off',
},
},
],
};