Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions docs/frontend/frontend-ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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