-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy patheslint.config.mjs
More file actions
84 lines (83 loc) · 2.02 KB
/
eslint.config.mjs
File metadata and controls
84 lines (83 loc) · 2.02 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
import eslint from "@eslint/js";
import { globalIgnores } from "eslint/config";
import github from "eslint-plugin-github";
import tseslint from "typescript-eslint";
export default tseslint.config(
globalIgnores([
"dist/",
"node_modules/",
"script/",
"eslint.config.mjs",
"build.mjs",
]),
github.getFlatConfigs().recommended,
...github.getFlatConfigs().typescript,
tseslint.configs.recommendedTypeChecked,
eslint.configs.recommended,
tseslint.configs.recommended,
{
rules: {
"sort-imports": "off",
"i18n-text/no-en": "off",
"import/extensions": [
"error",
{
json: "always",
},
],
"import/named": "off",
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-dynamic-require": "error",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
},
],
"import/no-namespace": "off",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
"import/order": [
"error",
{
alphabetize: {
order: "asc",
},
"newlines-between": "always",
},
],
"no-console": "off",
"no-sequences": "error",
"no-shadow": "off",
"@typescript-eslint/naming-convention": "error",
"eslint-comments/no-use": [
"error",
{
allow: [
"eslint-disable",
"eslint-enable",
"eslint-disable-next-line",
],
},
],
"@typescript-eslint/no-shadow": "error",
"one-var": ["error", "never"],
"@typescript-eslint/restrict-template-expressions": "off",
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {},
},
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
);