-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
35 lines (34 loc) · 1.25 KB
/
Copy patheslint.config.js
File metadata and controls
35 lines (34 loc) · 1.25 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
import globals from "globals";
import pluginJs from "@eslint/js";
import jsInHtml from "eslint-plugin-html";
import html from "@html-eslint/eslint-plugin";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
eslintPluginPrettierRecommended,
{
...html.configs["flat/recommended"],
files: ["templates/index.html"],
plugins: {
...html.configs["flat/recommended"].plugins,
...eslintPluginPrettierRecommended.plugins,
jsInHtml,
},
// languageOptions: { sourceType: "script" },
rules: {
...html.configs["flat/recommended"].rules, // Must be defined. If not, all recommended rules will be lost
...eslintPluginPrettierRecommended.rules,
"@html-eslint/indent": ["error", 4],
"@html-eslint/no-extra-spacing-attrs": [
"error",
{ enforceBeforeSelfClose: true },
],
"@html-eslint/require-closing-tags": [
"error",
{ selfClosing: "always" },
],
"@html-eslint/attrs-newline": "off",
},
},
];