mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
build: upgrade ESLint and its related packages
This commit is contained in:
+1
-1
@@ -9,5 +9,5 @@
|
|||||||
!astro.config.ts
|
!astro.config.ts
|
||||||
!package.json
|
!package.json
|
||||||
!.prettierrc
|
!.prettierrc
|
||||||
!eslint.config.mjs
|
!eslint.config.js
|
||||||
!README.md
|
!README.md
|
||||||
@@ -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"] },
|
||||||
|
];
|
||||||
@@ -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
@@ -33,17 +33,15 @@
|
|||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"@types/github-slugger": "^1.3.0",
|
"@types/github-slugger": "^1.3.0",
|
||||||
"@types/lodash.kebabcase": "^4.1.9",
|
"@types/lodash.kebabcase": "^4.1.9",
|
||||||
"@types/react": "^19.0.8",
|
"@typescript-eslint/parser": "^8.25.0",
|
||||||
"@typescript-eslint/parser": "^8.23.0",
|
"eslint": "^9.21.0",
|
||||||
"astro-eslint-parser": "^1.2.1",
|
|
||||||
"eslint": "^9.20.0",
|
|
||||||
"eslint-plugin-astro": "^1.3.1",
|
"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": "^3.4.2",
|
||||||
"prettier-plugin-astro": "^0.14.1",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
"react": "^19.0.0",
|
"typescript": "^5.7.3",
|
||||||
"react-dom": "^19.0.0",
|
"typescript-eslint": "^8.25.0"
|
||||||
"typescript-eslint": "^8.23.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user