Compare commits
2 commits
ea0c94d8e9
...
e4d551a551
| Author | SHA1 | Date | |
|---|---|---|---|
| e4d551a551 | |||
| 398bfcbb11 |
4 changed files with 5597 additions and 994 deletions
64
eslint.config.js
Normal file
64
eslint.config.js
Normal 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
6502
package-lock.json
generated
File diff suppressed because it is too large
Load diff
18
package.json
18
package.json
|
|
@ -9,12 +9,22 @@
|
||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/preact": "^4.0.10",
|
"@astrojs/preact": "^4.1.3",
|
||||||
"@astrojs/rss": "^4.0.11",
|
"@astrojs/rss": "^4.0.14",
|
||||||
"astro": "^5.7.5",
|
"astro": "^5.7.5",
|
||||||
"preact": "^10.25.4"
|
"preact": "^10.28.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,8 @@
|
||||||
"jsxImportSource": "preact",
|
"jsxImportSource": "preact",
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
}
|
},
|
||||||
}
|
"plugins": [
|
||||||
|
{ "name": "@astrojs/ts-plugin" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue