-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheslint.config.mjs
More file actions
47 lines (42 loc) · 1.1 KB
/
eslint.config.mjs
File metadata and controls
47 lines (42 loc) · 1.1 KB
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
import js from '@eslint/js'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import importPlugin from 'eslint-plugin-import'
import n from 'eslint-plugin-n'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import globals from 'globals'
export default [
js.configs.recommended,
...typescriptEslint.configs['flat/recommended'],
{
files: ['**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
import: importPlugin,
n,
'simple-import-sort': simpleImportSort,
},
rules: {
'import/no-cycle': 'error',
'n/no-extraneous-import': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
files: ['test/**'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
]