Set up eslint
This commit is contained in:
parent
447bcf39a7
commit
92f5e37a4c
5 changed files with 1044 additions and 2 deletions
1
.vscode/extensions.json
vendored
1
.vscode/extensions.json
vendored
|
|
@ -2,6 +2,7 @@
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"Vue.volar",
|
"Vue.volar",
|
||||||
"bradlc.vscode-tailwindcss",
|
"bradlc.vscode-tailwindcss",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"rust-lang.rust-analyzer",
|
"rust-lang.rust-analyzer",
|
||||||
"tamasfe.even-better-toml",
|
"tamasfe.even-better-toml",
|
||||||
|
|
|
||||||
21
gdn-app/eslint.config.js
Normal file
21
gdn-app/eslint.config.js
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
// https://eslint.org/docs/latest/use/configure/
|
||||||
|
// https://eslint.vuejs.org/user-guide/
|
||||||
|
|
||||||
|
import eslint from "@eslint/js";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
import configPrettier from "eslint-config-prettier";
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
{ ignores: ["dist/", "src/vite-env.d.ts"] },
|
||||||
|
eslint.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
...tseslint.configs.stylistic,
|
||||||
|
...pluginVue.configs["flat/recommended"],
|
||||||
|
|
||||||
|
// We don't want prettier's formatting decisions being second-guessed by eslint.
|
||||||
|
configPrettier,
|
||||||
|
|
||||||
|
// We need to tell the vue parser that it should use the ts parser instead of the js parser.
|
||||||
|
{ files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser } } },
|
||||||
|
);
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"check": "vue-tsc --noEmit && eslint",
|
||||||
|
"build": "pnpm check && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
|
|
@ -20,10 +21,15 @@
|
||||||
"vue": "^3.5.13"
|
"vue": "^3.5.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.20.0",
|
||||||
"@tauri-apps/cli": "^2.2.7",
|
"@tauri-apps/cli": "^2.2.7",
|
||||||
"@types/node": "^22.12.0",
|
"@types/node": "^22.12.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.1",
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
|
"eslint": "^9.20.0",
|
||||||
|
"eslint-config-prettier": "^10.0.1",
|
||||||
|
"eslint-plugin-vue": "^9.32.0",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
|
"typescript-eslint": "^8.23.0",
|
||||||
"vite": "^6.0.11",
|
"vite": "^6.0.11",
|
||||||
"vite-plugin-vue-devtools": "^7.7.1",
|
"vite-plugin-vue-devtools": "^7.7.1",
|
||||||
"vue-tsc": "^2.2.0"
|
"vue-tsc": "^2.2.0"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
pushd gdn-app
|
pushd gdn-app
|
||||||
pnpm build
|
pnpm check
|
||||||
popd
|
popd
|
||||||
|
|
||||||
cargo clippy
|
cargo clippy
|
||||||
|
|
|
||||||
1014
pnpm-lock.yaml
generated
1014
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue