-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
59 lines (54 loc) · 1.52 KB
/
eslint.config.ts
File metadata and controls
59 lines (54 loc) · 1.52 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
import css from "@eslint/css";
import js from "@eslint/js";
import markdown from "@eslint/markdown";
import html from "@html-eslint/eslint-plugin";
import htmlParser from "@html-eslint/parser";
import eslintConfigPrettier from "eslint-config-prettier/flat";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";
export default defineConfig([
globalIgnores(["dist/**/*", "node_modules/**/*"]),
eslintConfigPrettier,
tseslint.configs.recommended,
{
files: ["**/*.md"],
plugins: { markdown },
extends: ["markdown/recommended"],
language: "markdown/gfm",
rules: {
"markdown/no-html": ["error"],
},
},
{
files: ["**/*.html"],
plugins: { html },
extends: ["html/recommended"],
languageOptions: {
parser: htmlParser,
},
rules: {
"html/use-baseline": ["warn", { available: "widely" }],
"html/no-multiple-h1": ["warn"],
},
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: { globals: globals.browser },
},
{
files: ["**/*.css"],
plugins: { css },
language: "css/css",
languageOptions: { tolerant: true },
extends: ["css/recommended"],
rules: {
"css/font-family-fallbacks": ["warn"],
"css/no-invalid-at-rules": ["warn"],
"css/no-invalid-properties": ["error", { allowUnknownVariables: true }],
"css/use-baseline": ["warn", { available: "widely" }],
},
},
]);