-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
55 lines (54 loc) · 1.33 KB
/
eslint.config.mjs
File metadata and controls
55 lines (54 loc) · 1.33 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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginJest from "eslint-plugin-jest";
import { globalIgnores } from "eslint/config";
import json from "eslint-plugin-jsonc";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import markdown from "@eslint/markdown";
export default tseslint.config(
globalIgnores([".yarn/", "lib/"]),
{
files: ["**/*.md"],
plugins: {
markdown,
},
language: "markdown/commonmark",
rules: {
"markdown/no-html": "error",
},
},
{
files: ["**/*.json"],
plugins: { jsonc: json },
language: "jsonc/json",
rules: {
"jsonc/no-comments": "error",
},
},
{
files: ["**/*.ts"],
...eslint.configs.recommended,
},
{
// update this to match your test files
files: ["**/*.spec.ts", "**/*.test.ts"],
plugins: { jest: pluginJest },
languageOptions: {
globals: pluginJest.environments.globals.globals,
},
},
tseslint.configs.recommended,
{
rules: {
"no-case-declarations": "warn",
"no-undef": "warn",
"@typescript-eslint/no-empty-object-type": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
},
},
{
ignores: ["**/*.md"],
...eslintPluginPrettierRecommended,
},
);