-
Notifications
You must be signed in to change notification settings - Fork 247
/
Copy patheslint.config.mjs
58 lines (55 loc) · 1.27 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
import js from "@eslint/js";
import globals from "globals";
import tseslintPlugin from "@typescript-eslint/eslint-plugin";
import tseslintParser from "@typescript-eslint/parser";
import json from "@eslint/json";
import markdown from "@eslint/markdown";
import css from "@eslint/css";
export default [
js.configs.recommended,
{
files: ["**/*.{js,mjs,cjs,ts,tsx}"],
languageOptions: {
parser: tseslintParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
"@typescript-eslint": tseslintPlugin,
},
rules: {
...tseslintPlugin.configs.recommended.rules,
},
},
{
files: ["**/*.json"],
plugins: { json },
rules: { ...json.configs.recommended.rules },
},
{
files: ["**/*.jsonc"],
plugins: { json },
rules: { ...json.configs.recommended.rules },
},
{
files: ["**/*.json5"],
plugins: { json },
rules: { ...json.configs.recommended.rules },
},
{
files: ["**/*.md"],
plugins: { markdown },
rules: { ...markdown.configs.recommended.rules },
},
{
files: ["**/*.css"],
plugins: { css },
rules: { ...css.configs.recommended.rules },
},
];