-
Notifications
You must be signed in to change notification settings - Fork 25
/
eslint.config.mjs
45 lines (43 loc) · 1.54 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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginPromise from 'eslint-plugin-promise'
import globals from 'globals';
import ConfusingGlobals from 'confusing-browser-globals';
const config = tseslint.config(
{
files: ['web/typescript/**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.browser,
...globals.jquery,
},
},
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
pluginPromise.configs['flat/recommended'],
],
rules: {
'no-console': 'off',
'no-debugger': 'off',
'@typescript-eslint/no-deprecated': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-this-alias': 'off',
'no-restricted-globals': ['error', ...ConfusingGlobals],
'no-prototype-builtins': 'off',
'@typescript-eslint/no-empty-function': 'off',//todo
'@typescript-eslint/no-unused-vars': 'off',//todo
'no-empty': 'off',//todo
'no-useless-escape': 'off',//todo
'prefer-const': 'off',//todo
'promise/always-return': 'off',//todo
'promise/no-callback-in-promise': 'off',//todo
},
},
);
export default config;