forked from RomanHauksson/academic-project-astro-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
64 lines (63 loc) · 1.76 KB
/
Copy patheslint.config.ts
File metadata and controls
64 lines (63 loc) · 1.76 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
import js from "@eslint/js";
import globals from "globals";
import typescript from "typescript-eslint";
import react from "@eslint-react/eslint-plugin";
import astro from "eslint-plugin-astro";
import json from "@eslint/json";
import markdown from "@eslint/markdown";
import css from "@eslint/css";
import { tailwind4 } from "tailwind-csstree";
import { defineConfig, globalIgnores } from "eslint/config";
export default defineConfig([
globalIgnores(["dist/*", ".astro/*", ".vscode/*", "package-lock.json"]),
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: { globals: { ...globals.browser, ...globals.node } },
},
{
files: ["**/*.{ts,tsx,mts,cts}"],
extends: [typescript.configs.recommended],
},
{
files: ["**/*.astro"],
plugins: { astro },
extends: [astro.configs.recommended],
},
{
files: ["**/*.json"],
plugins: { json },
language: "json/json",
extends: [json.configs.recommended],
},
{
files: ["**/*.ts", "**/*.tsx"],
extends: [react.configs["recommended-typescript"]],
languageOptions: {
parser: typescript.parser,
parserOptions: {
// Enable project service for better TypeScript integration
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ["**/*.md"],
plugins: { markdown },
language: "markdown/gfm",
extends: [markdown.configs.recommended],
},
{
files: ["**/*.css"],
plugins: { css },
language: "css/css",
languageOptions: { customSyntax: tailwind4 },
extends: [css.configs.recommended],
rules: {
// Disable rules that don't work well with Tailwind v4 syntax
"css/no-invalid-at-rules": "off",
},
},
]);