-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
62 lines (62 loc) · 1.25 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
module.exports = {
env: {
node: true,
},
extends: ['@10up/eslint-config/react'],
plugins: ['eslint-plugin-cypress'],
globals: {
use: true,
page: true,
'cypress/globals': true,
},
rules: {
'jsx-a11y/anchor-is-valid': 0,
camelcase: 0,
'import/no-unresolved': [2, { ignore: ['^test-utils'] }],
'prefer-destructuring': [2, { array: false, object: true }],
// we want to allow changing object parameters.
'no-param-reassign': [2, { props: false }],
},
settings: {
react: {
version: '17',
},
},
overrides: [
{
files: ['packages/web/**/*.js'],
rules: {
'react/react-in-jsx-scope': 0,
},
},
{
files: ['cypress/**/*.js'],
extends: ['plugin:cypress/recommended'],
rules: {
'no-unused-expressions': 0,
'import/no-extraneous-dependencies': [2, { devDependencies: true }],
},
},
{
files: [
'*.stories.js',
'**/*/.storybook/*.js',
'**/*/tests/**/*.js',
'*.test.js',
'**/__tests__/**/*.[jt]s?(x)',
'setupTests.js',
'**/__mocks__/**/*.js',
],
extends: ['@10up/eslint-config/jest'],
rules: {
'import/no-extraneous-dependencies': [2, { devDependencies: true }],
},
},
{
files: ['packages/api/**/*.js'],
rules: {
'jsdoc/valid-types': 0,
},
},
],
};