-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
40 lines (39 loc) · 950 Bytes
/
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 {default as eslint, default as pluginJs} from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslintPluginPrettierRecommended,
pluginJs.configs.recommended,
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
ignores: ['**/dist/**'],
},
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.cjs'],
extends: [tseslint.configs.disableTypeChecked],
languageOptions: {
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.amd,
},
},
},
{
files: ['**/*.mjs'],
extends: [tseslint.configs.disableTypeChecked],
languageOptions: {
sourceType: 'module',
},
}
);