-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
42 lines (41 loc) · 1000 Bytes
/
eslint.config.mjs
File metadata and controls
42 lines (41 loc) · 1000 Bytes
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
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import globals from 'globals'
import tsEslintPlugin from '@typescript-eslint/eslint-plugin'
import tsEslintParser from '@typescript-eslint/parser'
export default [
{
ignores: ['lib/**', 'node_modules/**', 'assets/**'],
},
js.configs.recommended,
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsEslintParser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.node,
},
},
plugins: {
'@typescript-eslint': tsEslintPlugin,
},
rules: {
...tsEslintPlugin.configs.recommended.rules,
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-floating-promises': 'error',
},
},
eslintConfigPrettier,
]