-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
53 lines (48 loc) · 1.28 KB
/
eslint.config.js
File metadata and controls
53 lines (48 loc) · 1.28 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
import { defineConfig, globalIgnores } from "eslint/config";
import html from "eslint-plugin-html";
import tailwindcss from "eslint-plugin-tailwindcss";
import globals from "globals";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import path from "path";
import { fileURLToPath } from "url";
// ESM workaround for __dirname
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
export default defineConfig([
{
plugins: {
html,
tailwindcss,
},
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: "latest",
sourceType: "module",
},
extends: compat.extends(
"eslint:recommended",
"plugin:tailwindcss/recommended"
),
rules: {},
},
{
languageOptions: {
globals: {
...globals.node,
},
sourceType: "script",
},
files: ["**/.eslint.config.{js,cjs}"],
},
globalIgnores([
"**/tailwind.config.js",
"static/js/lightense.min.js",
]),
]);