From 02a0d694a1f3ba58a79cf9eb3a46d68b7ff9f903 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 9 Jan 2026 14:17:59 +0100 Subject: [PATCH] fix(eslintrc): switch to new config name after update --- .eslintrc.cjs | 21 --------------------- eslint.config.mjs | 24 ++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 22 deletions(-) delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.mjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 5664b8e..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - extends: [ - "plugin:astro/recommended", - "plugin:@typescript-eslint/recommended" - ], - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint"], - overrides: [ - { - files: ["*.astro"], - parser: "astro-eslint-parser", - parserOptions: { - parser: "@typescript-eslint/parser", - extraFileExtensions: [".astro"], - }, - rules: { - // Tu peux ajouter des règles spécifiques ici - }, - }, - ], -}; \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..d805cc8 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,24 @@ +import eslintPluginAstro from 'eslint-plugin-astro'; +import tsParser from '@typescript-eslint/parser'; + +export default [ + // Configuration pour les fichiers Astro + ...eslintPluginAstro.configs.recommended, + { + files: ["**/*.astro"], + languageOptions: { + parser: eslintPluginAstro.parser, + parserOptions: { + parser: tsParser, + extraFileExtensions: [".astro"], + }, + }, + rules: { + // Tes règles personnalisées ici + }, + }, + // On ignore le dossier de build + { + ignores: ["dist/*", ".astro/*"] + } +]; \ No newline at end of file diff --git a/package.json b/package.json index b808e4b..031fa74 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "astro build", "preview": "astro preview", "astro": "astro", - "lint": "eslint src/**/*.{js,ts,astro}", + "lint": "eslint .", "check": "astro check" }, "dependencies": {