-
-
Notifications
You must be signed in to change notification settings - Fork 228
Expand file tree
/
Copy patheslint.config.js
More file actions
104 lines (96 loc) · 2.9 KB
/
Copy patheslint.config.js
File metadata and controls
104 lines (96 loc) · 2.9 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
const {
defineConfig,
globalIgnores,
} = require("eslint/config");
const tsParser = require("@typescript-eslint/parser");
const jest = require("eslint-plugin-jest");
const globals = require("globals");
const js = require("@eslint/js");
const {
FlatCompat,
} = require("@eslint/eslintrc");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = defineConfig([{
languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: "module",
parserOptions: {
projectService: true,
tsconfigRootDir: __dirname,
},
globals: {
...jest.environments.globals.globals,
...globals.node,
__DEV__: true,
console: true,
should: true,
Utils: true,
window: true,
},
},
extends: compat.extends(
"plugin:react/recommended",
"plugin:@typescript-eslint/strict-type-checked",
"prettier",
"plugin:prettier/recommended",
),
plugins: {
jest,
},
settings: {
react: {
version: "19.1.0",
},
},
rules: {
"jest/no-identical-title": 0,
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
"eslint-comments/no-unlimited-disable": 0,
"no-new": 0,
"no-continue": 0,
"no-extend-native": 0,
"import/no-dynamic-require": 0,
"global-require": "off",
"class-methods-use-this": 0,
"no-console": 1,
"no-plusplus": 0,
"no-undef": "error",
"no-shadow": 0,
"no-catch-shadow": 0,
"no-underscore-dangle": "off",
"no-use-before-define": 0,
"import/no-unresolved": 0,
"no-empty-description": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true}],
"mocha/no-skipped-tests": "off",
"mocha/no-top-level-hooks": "off",
"mocha/no-hooks-for-single-case": "off",
"mocha/no-setup-in-describe": "off",
"mocha/no-mocha-arrows": "off",
},
}, globalIgnores([
"lib/version.js",
"**/node_modules/**/*",
"**/node_modules",
"**/scripts/",
"**/coverage",
"**/docs",
"**/dist/",
])]);