-
Notifications
You must be signed in to change notification settings - Fork 271
/
Copy patheslint.config.mts
61 lines (58 loc) · 1.48 KB
/
eslint.config.mts
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
import js from "@eslint/js"
import prettierConfig from "eslint-config-prettier/flat"
import type { ConfigArray } from "typescript-eslint"
import { config, configs } from "typescript-eslint"
const eslintConfig: ConfigArray = config(
{
name: "global-ignores",
ignores: [
"**/*.snap",
"**/dist/",
"**/.yalc/",
"**/build/",
"**/temp/",
"**/.temp/",
"**/.tmp/",
"**/.yarn/",
"**/coverage/",
"packages/rtk-app-structure-example",
"packages/vite-template-redux",
"packages/react-native-template-redux-typescript/template",
"packages/expo-template-redux-typescript",
"packages/cra-template-redux/template",
"packages/cra-template-redux-typescript/template",
],
},
{
name: `${js.meta.name}/recommended`,
...js.configs.recommended,
},
configs.strictTypeChecked,
configs.stylisticTypeChecked,
{
name: "main",
linterOptions: {
reportUnusedDisableDirectives: 2,
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"no-undef": [0],
"@typescript-eslint/consistent-type-definitions": [2, "type"],
"@typescript-eslint/consistent-type-imports": [
2,
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: true,
},
],
},
},
prettierConfig,
)
export default eslintConfig