-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
56 lines (52 loc) · 1.25 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
50
51
52
53
54
55
56
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import eslint from '@eslint/js';
import jestPlugin from 'eslint-plugin-jest';
import tseslint from 'typescript-eslint';
import prettierConfig from 'eslint-config-prettier';
export default tseslint.config(
{
ignores: [
'**/node_modules',
'**/dist/',
'**/lib/',
'**/.nvmrc',
'**/examples/',
'src/fft-api/types/typescript-fetch-client/',
'babel.config.js',
'jest.config.cjs',
'jest.setup.cjs',
'eslint.config.mjs',
'tsup.config.js',
],
},
prettierConfig,
eslint.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
{
files: ['**/*.spec.ts', '**/*.test.ts'],
...jestPlugin.configs['flat/recommended'],
},
{
languageOptions: {
globals: {
...globals.jest,
...globals.node,
},
parser: tsParser,
ecmaVersion: 2021,
sourceType: 'commonjs',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: globals.__dirname,
},
},
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'no-console': 'error',
'no-undef': 'error',
'no-const-assign': 'error',
},
}
);