-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.typescript.js
55 lines (54 loc) · 1.42 KB
/
eslint.typescript.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import js from "@eslint/js";
import tseslint from 'typescript-eslint'
import tsParser from "@typescript-eslint/parser";
import globals from "globals";
export default tseslint.config(
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
'it': true,
'describe': true,
'chai': true,
'mocha': true,
'hljs': true
},
parser: tsParser,
parserOptions: {
project: "./tsconfig.json"
}
},
files: ['**/*.ts'],
extends: [
js.configs.recommended,
tseslint.configs.base
],
plugins: {},
rules: {
'no-debugger': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion' : 'off',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-empty-function': 'warn',
'no-unused-labels': 'off',
'no-unused-vars': 'warn',
'no-var': 'error',
'eqeqeq': 'error',
'no-trailing-spaces': 'error',
'semi': 'error',
'strict': 'error',
'quotes': ['error', 'single'],
}
},
{
files: ['**/*.test.ts'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
}
},
)