-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
58 lines (58 loc) · 1.66 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
module.exports = {
root: true,
extends: ['@strapi/eslint-config/back/typescript'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin-rxjs'],
parserOptions: {
project: ['./tsconfig.eslint.json'],
},
overrides: [
{
files: ['./scripts/**/*', './src/cli/errors.ts', './src/cli/index.ts'],
rules: {
'no-console': ['error', { allow: ['error'] }],
},
},
{
files: ['./src/cli/commands/utils/logger.ts'],
rules: {
'no-console': 'off',
},
},
],
rules: {
'rxjs/finnish': 'error',
// TODO: The following rules from @strapi/eslint-config/back/typescript are disabled because they're causing problems we need to solve or fix
// to be solved in configuration
'node/no-unsupported-features/es-syntax': 'off',
'import/prefer-default-export': 'off',
'import/namespace': 'off',
'node/no-missing-import': 'off',
'no-process-exit': 'off',
'import/no-dynamic-require': 'off',
'global-require': 'off',
'no-underscore-dangle': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
/**
* Force us to use the Logger instance.
*/
'no-console': 'error',
'import/extensions': 'off',
'import/order': [
'error',
{
groups: [
['external', 'internal', 'builtin'],
'parent',
['sibling', 'index'],
'object',
'type',
],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'nonblock-statement-body-position': ['error', 'below'],
},
};