-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
40 lines (39 loc) · 1.28 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
import js from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import importPlugin from 'eslint-plugin-import';
import prettier from 'eslint-config-prettier';
import jestPlugin from 'eslint-plugin-jest';
import globals from "globals";
export default [
js.configs.recommended,
{
ignores: ['dist/**'],
files: ['**/*.ts', '**/*.tsx'],
plugins: {
'@typescript-eslint': tsPlugin,
'import': importPlugin,
jest: jestPlugin,
},
languageOptions: {
parser: tsParser,
parserOptions: {
project: './tsconfig.json',
},
globals: {
...jestPlugin.environments.globals.globals,
...globals.node,
}
},
rules: {
...tsPlugin.configs['recommended'].rules,
...jestPlugin.configs['recommended'].rules,
'@/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'@/no-throw-literal': 'error',
'import/prefer-default-export': 'off',
'class-methods-use-this': 'off',
"jest/prefer-importing-jest-globals": "error",
},
},
prettier,
];