From b17c77ab4579b56ac384b42925369ca23dd19942 Mon Sep 17 00:00:00 2001 From: jasontaylordev Date: Wed, 25 Feb 2026 09:24:18 +1000 Subject: [PATCH] Recommend ESLint IDE integration for lint workflow --- README.md | 2 +- docs/frontend/frontend-ide.md | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a7ab71a05e..b72cea4644 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ This command generates a report indicating the percentage of statements, branche - `dev` - runs `vite` that starts the development server doing hot reload over source files - `build` - runs build script that outputs files to `..\app` folder -- `lint` - checks with eslint all vue, ts, and js files +- `lint` - checks with eslint all vue, ts, and js files. See [IDE setup](/docs/frontend/frontend-ide.md) to catch errors on save, or run manually before committing. - `type-check` - runs TypeScript in no emit mode #### Vitest diff --git a/docs/frontend/frontend-ide.md b/docs/frontend/frontend-ide.md index 54037e7684..83468a4a3d 100644 --- a/docs/frontend/frontend-ide.md +++ b/docs/frontend/frontend-ide.md @@ -31,21 +31,12 @@ You can change your KeyMap under `File | Settings | Keymap`. A good option is th ### Extensions -#### Option 1 +#### Option 1 (Recommended) -This option will run a formatter on every save, which is very quick - -- Install the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension - - In VSCode `File | Preferences | Settings`, set default formatter to Prettier and check 'Format on Save' - ![Prettier](vscode-prettier.png) -- Ensure you run `npm run lint` before committing code, to identify any style or code issues - -#### Option 2 - -This option runs the formatter _and_ linter on every save. It will be slower than option 1, but the solution is rather small so the impact shouldn't be large. +This option runs the formatter _and_ linter on every save, catching errors immediately in your IDE. The solution is small enough that the performance impact is negligible. - Install the [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension -- enable the following user setting (there is no UI for this, but you can find the codeActionsOnSave setting in `File | Preferences | Settings` which will open the settings file at the correct location for you): +- Enable the following user setting (there is no UI for this, but you can find the codeActionsOnSave setting in `File | Preferences | Settings` which will open the settings file at the correct location for you): ```json { @@ -54,3 +45,12 @@ This option runs the formatter _and_ linter on every save. It will be slower tha } } ``` + +#### Option 2 + +This option will run a formatter on every save, which is very quick. Use this if you prefer a lighter-weight setup. + +- Install the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension + - In VSCode `File | Preferences | Settings`, set default formatter to Prettier and check 'Format on Save' + ![Prettier](vscode-prettier.png) +- **Important:** Run `npm run lint` before committing code to catch any style or code issues that Prettier doesn't cover