add eslint

This commit is contained in:
ClasWen 2024-05-18 18:23:51 +08:00
parent 92b728f6d0
commit a3a0f10463
3 changed files with 18525 additions and 13222 deletions

33
eslint.config.js Normal file
View file

@ -0,0 +1,33 @@
// ts-check
import globals from "globals"
import eslint from "@eslint/js"
import eslintPluginAstro from "eslint-plugin-astro"
import stylistic from "@stylistic/eslint-plugin"
export default [
eslint.configs.recommended,
...eslintPluginAstro.configs.recommended,
stylistic.configs.customize({
indent: 2,
quotes: "double",
semi: false,
jsx: true,
}),
{
ignores: ["dist"],
languageOptions: {
globals: {
...globals.browser,
},
},
rules: {
"prefer-const": [
"error",
{
destructuring: "any",
ignoreReadBeforeAssign: false,
},
],
},
},
]

31636
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,34 +1,48 @@
{
"name": "blog",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.3.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vue": "^4.0.9",
"@fullcalendar/core": "^6.1.11",
"@fullcalendar/daygrid": "^6.1.11",
"@fullcalendar/icalendar": "^6.1.11",
"@fullcalendar/react": "^6.1.11",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"astro": "^4.5.12",
"ical.js": "^1.5.0",
"md5": "^2.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype": "^13.0.1",
"sharp": "^0.33.3",
"tailwindcss": "^3.4.3",
"unist-util-visit": "^5.0.0",
"vue": "^3.4.21"
}
"name": "blog",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"lint": "eslint",
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^3.3.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vue": "^4.0.9",
"@fullcalendar/core": "^6.1.11",
"@fullcalendar/daygrid": "^6.1.11",
"@fullcalendar/icalendar": "^6.1.11",
"@fullcalendar/react": "^6.1.11",
"@stylistic/eslint-plugin": "^2.1.0",
"astro": "^4.5.12",
"ical.js": "^1.5.0",
"md5": "^2.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype": "^13.0.1",
"sharp": "^0.33.3",
"tailwindcss": "^3.4.3",
"unist-util-visit": "^5.0.0",
"vue": "^3.4.21"
},
"devDependencies": {
"@types/eslint__js": "^8.42.3",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-astro": "^1.2.0",
"eslint-plugin-import": "^2.29.1",
"globals": "^15.2.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.9.0"
}
}