Compare commits

...

3 commits

Author SHA1 Message Date
ec367621f5 Merge remote-tracking branch 'origin/main' 2025-12-31 21:07:26 +09:00
e4d551a551 chore: add unified ESLint config for TS, Astro, and JSX
- Introduce eslint.config.js with flat‑config structure
- Enable TypeScript linting using @typescript-eslint parser and plugin
- Add Astro parser/plugin with recommended rules
- Configure React/Preact JSX linting including react-hooks rules
- Apply project-aware parserOptions for TypeScript
2025-12-31 21:01:21 +09:00
398bfcbb11 chore: update Astro/Preact deps and add TS/ESLint tooling
- Bump @astrojs/* and preact to latest minor versions
- Add Astro TS plugin and language server packages
- Introduce ESLint plugins for React, Astro, and TypeScript
- Update TypeScript to 5.9.x
- Enable @astrojs/ts-plugin in tsconfig.json
- Regenerate package-lock.json accordingly
2025-12-31 20:58:07 +09:00
4 changed files with 5597 additions and 994 deletions

64
eslint.config.js Normal file
View file

@ -0,0 +1,64 @@
// eslint.config.js
import js from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import astroPlugin from "eslint-plugin-astro";
import astroParser from "astro-eslint-parser";
import reactPlugin from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
export default [
js.configs.recommended,
// TypeScript
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
},
},
// Astro
{
files: ["**/*.astro"],
languageOptions: {
parser: astroParser,
parserOptions: {
parser: tsParser,
},
},
plugins: {
astro: astroPlugin,
},
rules: {
...astroPlugin.configs.recommended.rules,
},
},
// JSX / Preact
{
files: ["**/*.jsx", "**/*.tsx"],
plugins: {
react: reactPlugin,
"react-hooks": reactHooks,
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
},
settings: {
react: {
version: "detect",
},
},
},
];

6502
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,12 +9,22 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^4.0.10",
"@astrojs/rss": "^4.0.11",
"@astrojs/preact": "^4.1.3",
"@astrojs/rss": "^4.0.14",
"astro": "^5.7.5",
"preact": "^10.25.4"
"preact": "^10.28.0"
},
"devDependencies": {
"typescript": "^5.7.3"
"@astrojs/language-server": "^2.16.2",
"@astrojs/ts-plugin": "^1.10.6",
"typescript": "^5.9.3",
"typescript-language-server": "^5.1.3",
"@typescript-eslint/parser": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-astro": "^1.5.0",
"astro-eslint-parser": "^1.2.2",
"vscode-langservers-extracted": "^4.10.0"
}
}

View file

@ -12,5 +12,8 @@
"jsxImportSource": "preact",
"strictNullChecks": true,
"allowJs": true
}
}
},
"plugins": [
{ "name": "@astrojs/ts-plugin" }
]
}