-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
49 lines (45 loc) · 1.08 KB
/
eslint.config.mjs
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
import typescriptParser from '@typescript-eslint/parser';
import loveConfig from 'eslint-config-love';
import importPlugin from 'eslint-plugin-import';
import nodePlugin from 'eslint-plugin-node';
import prettierPlugin from 'eslint-plugin-prettier';
const languageOptions = {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 'latest',
project: './tsconfig.json'
}
};
const plugins = {
import: importPlugin,
node: nodePlugin,
prettier: prettierPlugin
// '@typescript-eslint': typescriptPlugin
};
export default [
loveConfig,
{
ignores: ['node_modules/*', 'dist/*', 'coverage/*']
},
{
files: ['src/**/*.ts'],
languageOptions,
plugins,
rules: {
'@typescript-eslint/no-magic-numbers': 'warn',
'@typescript-eslint/no-extraneous-class': 'warn'
}
},
{
files: ['**/constants.ts', '**/enums.ts', 'src/schemas/**/*.ts'],
rules: {
'@typescript-eslint/no-magic-numbers': 'off'
}
},
{
files: ['src/schemas/**/*.ts'],
rules: {
'@typescript-eslint/no-unnecessary-type-parameters': 'off'
}
}
];