-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy patheslint.config.mjs
76 lines (73 loc) · 1.53 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import importPlugin from 'eslint-plugin-import';
import jestPlugin from 'eslint-plugin-jest';
/** @type {import('eslint').Linter.Config[]} */
export default [
importPlugin.flatConfigs.recommended,
{
files: ["*/*.js"],
languageOptions: {
ecmaVersion: 2020,
sourceType: "module"
},
plugins: {
jest: jestPlugin
},
rules: {
'import/no-deprecated': [
'warn'
],
'brace-style': [
'warn',
'1tbs',
{
'allowSingleLine': true
}
],
'capitalized-comments': [
'off',
'never'
],
'comma-dangle': 'error',
'default-case': 'error',
'dot-notation': 'off',
'id-denylist': [
'error',
'String',
'string',
'Boolean',
'boolean',
'Undefined',
'undefined'
],
'indent': [
'warn',
4
],
'no-empty': 'error',
'no-empty-function': 'off',
'no-redeclare': 'error',
'no-shadow': 'off',
'no-unused-expressions': 'warn',
'no-use-before-define': 'off',
'semi': 'error',
// Jest rules
"jest/no-disabled-tests": "off",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "warn",
"jest/prefer-spy-on": "warn",
"jest/prefer-to-be": "warn",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
}
},
{
ignores: ["dist/", "docs/"]
},
{
settings: {
"import/ignore": [
"vitest"
],
},
}
];