-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
39 lines (39 loc) · 933 Bytes
/
.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
module.exports = {
root: true,
extends: ['@redwoodjs/eslint-config'],
plugins: ['jsdoc'],
rules: {
// max line length => 100
'max-len': ['error', { code: 100, tabWidth: 2 }],
'jsdoc/require-jsdoc': ['error', { publicOnly: true }],
'no-restricted-imports': [
'error',
{ name: 'dayjs', message: 'Please import from `dayjs.ts` instead' },
],
},
overrides: [
{
files: ['**/*SVG.tsx', '**/*.test.ts', '**/*.test.tsx'],
rules: {
'max-len': 'off',
},
},
{
files: ['api/src/lib/shared/**/*'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['*api.config*'],
message:
'API config values are forbidden in library code shared with the web side',
},
],
},
],
},
},
],
}