Skip to content

Commit f4338ff

Browse files
committed
feat: add Astro support
1 parent 6bfc2ae commit f4338ff

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/astro.cts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export const astroConfig = {
2+
// astro files
3+
files: ["*.astro"],
4+
parser: "astro-eslint-parser",
5+
parserOptions: {
6+
parser: "@typescript-eslint/parser",
7+
extraFileExtensions: [".astro"],
8+
},
9+
plugins: ["astro", "only-warn"],
10+
extends: ["plugin:astro/recommended"],
11+
}

src/index.cts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { htmlConfig } from "./html.cjs"
88
import { pluginImportSettings } from "./plugin-import-rules.cjs"
99
import semverMajor from "semver/functions/major"
1010
import { getEslintVersion } from "./eslint-version.cjs"
11+
import { astroConfig } from "./astro.cjs"
1112

1213
function maybeAddCoffeeScript() {
1314
try {
@@ -38,7 +39,7 @@ const config = {
3839
measure: "readonly",
3940
},
4041
...jsConfig,
41-
overrides: [tsConfig, jsonConfig, yamlConfig, htmlConfig, ...maybeAddCoffeeScript()],
42+
overrides: [tsConfig, jsonConfig, yamlConfig, htmlConfig, astroConfig, ...maybeAddCoffeeScript()],
4243
settings: {
4344
...pluginImportSettings,
4445
},

0 commit comments

Comments
 (0)