31 lines
717 B
TypeScript
31 lines
717 B
TypeScript
import type { Linter } from "eslint";
|
|
|
|
import astro from "eslint-plugin-astro";
|
|
|
|
export const règlesAstro: Readonly<Linter.Config> = {
|
|
files: ["**/*.astro"],
|
|
plugins: {
|
|
astro: astro.configs["flat/base"][0]?.plugins.astro ?? {},
|
|
},
|
|
languageOptions: {
|
|
parser: "astro-eslint-parser",
|
|
sourceType: "module",
|
|
parserOptions: {
|
|
parser: {
|
|
version: "8.57.0",
|
|
meta: {
|
|
name: "typescript-eslint/parser",
|
|
version: "8.57.0",
|
|
},
|
|
},
|
|
extraFileExtensions: [".astro"],
|
|
},
|
|
},
|
|
rules: {
|
|
...astro.configs["flat/recommended"][4]?.rules,
|
|
...astro.configs["jsx-a11y-strict"][4]?.rules,
|
|
},
|
|
name: "Astro",
|
|
};
|
|
|
|
console.debug(règlesAstro);
|