-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
36 lines (35 loc) · 992 Bytes
/
eslint.config.js
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
import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import mochaPlugin from 'eslint-plugin-mocha';
export default [
mochaPlugin.configs.flat.recommended,
eslint.configs.recommended,
...tseslint.configs.recommended, // TBD recommendedTypeChecked
eslintPluginPrettierRecommended,
{
files: ['**/*.{js,mjs,cjs,ts}'],
languageOptions: {
// parserOptions: {
// projectService: {
// allowDefaultProject: ['*.js', '*.ts'],
// defaultProject: './tsconfig.json',
// },
// tsconfigRootDir: import.meta.dirname,
// },
globals: {
...globals.es2020,
...globals.node,
...globals.mocha,
},
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['**/*.js'],
languageOptions: { sourceType: 'commonjs' },
},
];