build: upgrade ESLint and its related packages

This commit is contained in:
satnaing
2025-02-25 19:57:49 +07:00
committed by Sat Naing
parent 90231031a5
commit d167f6295d
4 changed files with 27 additions and 53 deletions
+1 -1
View File
@@ -9,5 +9,5 @@
!astro.config.ts
!package.json
!.prettierrc
!eslint.config.mjs
!eslint.config.js
!README.md
+20
View File
@@ -0,0 +1,20 @@
import eslintPluginAstro from "eslint-plugin-astro";
import globals from "globals";
import jsxA11y from "eslint-plugin-jsx-a11y";
import tseslint from "typescript-eslint";
export default [
jsxA11y.flatConfigs.recommended,
...tseslint.configs.recommended,
...eslintPluginAstro.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{ rules: { "no-console": "error" } },
{ ignores: ["dist/**", ".astro"] },
];
-44
View File
@@ -1,44 +0,0 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import astroParser from "astro-eslint-parser";
import eslintPluginAstro from "eslint-plugin-astro";
export default [
js.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginAstro.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["*.astro"],
languageOptions: {
parser: astroParser,
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
},
},
{
files: ["tailwind.config.cjs", "**/*.d.ts"],
rules: {
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/triple-slash-reference": "off",
},
},
{
rules: {
"@typescript-eslint/no-unused-expressions": "off",
},
},
{
ignores: ["dist/**", ".astro"],
},
];
+6 -8
View File
@@ -33,17 +33,15 @@
"@tailwindcss/typography": "^0.5.16",
"@types/github-slugger": "^1.3.0",
"@types/lodash.kebabcase": "^4.1.9",
"@types/react": "^19.0.8",
"@typescript-eslint/parser": "^8.23.0",
"astro-eslint-parser": "^1.2.1",
"eslint": "^9.20.0",
"@typescript-eslint/parser": "^8.25.0",
"eslint": "^9.21.0",
"eslint-plugin-astro": "^1.3.1",
"globals": "^15.14.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.11",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript-eslint": "^8.23.0"
"typescript": "^5.7.3",
"typescript-eslint": "^8.25.0"
}
}