-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
35 lines (34 loc) · 932 Bytes
/
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
import htmlPlugin from "eslint-plugin-html"
import js from "@eslint/js"
import html from "@html-eslint/eslint-plugin"
import htmlParser from "@html-eslint/parser"
export default [{
...html.configs["flat/recommended"],
files: ["templates/**/*.html"],
linterOptions: {
reportUnusedDisableDirectives: "error"
},
languageOptions: {
globals: {
window: "readonly",
document: "readonly",
navigator: "readonly",
localStorage: "readonly",
dataLayer: "readonly",
},
parser: htmlParser,
},
plugins: {
htmlPlugin,
"@html-eslint": html,
},
settings: {
"html/report-bad-indent": "error",
},
rules: {
...js.configs.recommended.rules,
...html.configs["flat/recommended"].rules,
"@html-eslint/indent": "error",
"@html-eslint/require-lang": "off",
},
}]