forked from strapi/strapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
42 lines (38 loc) · 1.05 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
const frontPaths = [
'packages/**/admin/src/**/*.js',
'packages/generators/app/lib/resources/files/admin/app.js',
'packages/**/ee/admin/**/*.js',
'packages/core/helper-plugin/**/*.js',
'packages/**/tests/front/**/*.js',
'test/config/front/**/*.js',
];
module.exports = {
parserOptions: {
ecmaVersion: 2020,
},
overrides: [
// Backend javascript
{
files: ['packages/**/*.js', 'test/**/*.js', 'scripts/**/*.js', 'jest.*.js'],
excludedFiles: frontPaths,
...require('./.eslintrc.back.js'),
},
// Backend typescript
{
files: ['packages/**/*.ts', 'test/**/*.ts', 'scripts/**/*.ts', 'jest.*.ts'],
excludedFiles: [...frontPaths, '**/*.d.ts'],
...require('./.eslintrc.back.typescript.js'),
},
// Type definitions
{
files: ['packages/**/*.d.ts', 'test/**/*.d.ts', 'scripts/**/*.d.ts'],
excludedFiles: frontPaths,
...require('./.eslintrc.back.type-definitions.js'),
},
// Frontend
{
files: frontPaths,
...require('./.eslintrc.front.js'),
},
],
};