Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
67 lines (66 loc) · 1.93 KB
/
Copy patheslint.config.js
File metadata and controls
67 lines (66 loc) · 1.93 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
// @ts-check
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
import htmlEslint from "@html-eslint/eslint-plugin";
import customRules from "./eslint-rules/index.js";
export default defineConfig(
globalIgnores(["dist", ".agents"]),
{
name: "app/ts",
files: ["**/*.{ts,tsx}"],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
linterOptions: {
reportUnusedDisableDirectives: "error",
},
plugins: {
custom: customRules,
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"custom/no-placeholder-comments": "error",
"no-warning-comments": ["error", { terms: ["fixme"] }],
},
},
{
name: "app/html",
files: ["**/*.html"],
extends: [htmlEslint.configs["flat/recommended"]],
plugins: {
custom: customRules,
},
rules: {
"@html-eslint/require-meta-description": "error",
"@html-eslint/require-meta-viewport": "error",
"@html-eslint/require-open-graph-protocol": [
"error",
["og:type", "og:title", "og:description"],
],
// The manifest link below intentionally uses `rel="manifest"`; the
// baseline data currently flags this attribute value as not widely
// available, which is a false positive for our use case.
"@html-eslint/use-baseline": "off",
"custom/no-inline-script": "error",
"custom/require-webmanifest": "error",
},
},
);