-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
54 lines (54 loc) · 1.53 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
module.exports = {
env: {
browser: true,
node: true,
'jest/globals': true,
},
parserOptions: {
sourceType: 'module',
},
plugins: [
'security',
'jest',
'jest-formatting',
'jest-dom',
'testing-library',
'sonarjs',
'chai-friendly',
'regexp',
],
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:jest-formatting/recommended',
'plugin:jest-dom/recommended',
'plugin:testing-library/dom',
'plugin:jsdoc/recommended',
'plugin:security/recommended',
'plugin:compat/recommended',
'plugin:sonarjs/recommended',
'plugin:regexp/recommended',
'prettier',
],
rules: {
'chai-friendly/no-unused-expressions': 'off',
'testing-library/prefer-screen-queries': 'warn',
// These rules check if your package requires devDependencies. These rules
// are useful if you're publishing a package to npm but we're not, we're
// building an application and we require devDependencies in a lot of
// places. For our use case it makes sense to disable this rule.
// Read more: https://github.com/mysticatea/eslint-plugin-node/issues/47
'node/no-unpublished-require': 'off',
'node/no-unpublished-import': 'off',
// Even though we target Node v14 (and v12 also supported modules), eslint
// still complains that modules are not yet supported.
'node/no-unsupported-features/es-syntax': [
'error',
{
ignores: ['modules'],
},
],
},
};