-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
77 lines (76 loc) · 2.5 KB
/
eslint.config.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { baseConfig } from '@enormora/eslint-config-base';
import { typescriptConfig } from '@enormora/eslint-config-typescript';
import { nodeConfig, nodeConfigFileConfig, nodeEntryPointFileConfig } from '@enormora/eslint-config-node';
import { avaConfig } from '@enormora/eslint-config-ava';
export default [
{
ignores: ['target/**/*', 'integration-tests/fixtures/**/*']
},
baseConfig,
nodeConfig,
{
...typescriptConfig,
files: ['**/*.ts']
},
{
...avaConfig,
files: ['**/*.test.ts', 'source/test-libraries/**/*.ts', 'integration-tests/**/*.ts']
},
{
...nodeConfigFileConfig,
files: ['eslint.config.js', 'ava.config.js', 'ava.integration.config.js', 'packtory.config.js']
},
{
...nodeConfigFileConfig,
files: ['packtory.config.js'],
rules: {
'node/no-process-env': 'off'
}
},
{
...nodeEntryPointFileConfig,
files: ['source/packages/**/*.entry-point.ts']
},
{
files: ['**/*.ts'],
rules: {
'@typescript-eslint/no-extra-parens': 'off',
'@typescript-eslint/no-magic-numbers': [
'error',
{
ignoreEnums: false,
ignoreNumericLiteralTypes: true,
ignoreReadonlyClassProperties: false,
ignoreTypeIndexes: false,
ignoreDefaultValues: true,
ignoreArrayIndexes: false,
detectObjects: false,
enforceConst: false,
ignoreClassFieldInitialValues: false,
ignore: [-1, 0, 1]
}
],
'max-lines-per-function': 'off',
'import/extensions': [
'error',
{
js: 'always',
jsx: 'always',
json: 'always',
ignorePackages: true
}
],
// re-enable once https://github.com/eslint-functional/eslint-plugin-functional/issues/733 is fixed
'functional/prefer-immutable-types': 'off',
// re-enable once https://github.com/eslint-functional/eslint-plugin-functional/issues/733 is fixed
'functional/type-declaration-immutability': 'off'
}
},
{
files: ['**/*.test.ts'],
rules: {
'@typescript-eslint/no-magic-numbers': 'off',
'max-lines': 'off'
}
}
];