Skip to content

Commit

Permalink
docs(README): update linting documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tillywoodfield committed Oct 15, 2024
1 parent 4758f76 commit 9e9cb0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"editor.formatOnSave": false,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.associations": {
"*.xslt": "xml"
},
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,18 @@ let myEnvVariable = config.ENV_VAR

## Linting and Code Formatting

### Prerequisities
[ESlint](https://eslint.org/) is used for code quality and [Prettier](https://prettier.io/) is used for formatting rules, see [Prettier vs. Linters](https://prettier.io/docs/en/comparison).

- To show linting inline install [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) for VSCode
To run linting, use `npm run lint`, and to format the project, use `npm run format`.

### Info
### VS Code Integration

- This is done with eslint following the airbnb-base style and using [Prettier](https://prettier.io). Implemented with [this](https://sourcelevel.io/blog/how-to-setup-eslint-and-prettier-on-node) guide.
- If you use VSCode the formatting will happen automagically on save due to the `.vscode/settings.json` > `"editor.formatOnSave": true` setting
Autosave is enabled in `.vscode/settings.json`.

Recommended Plugins:

- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

## Creating a new route

Expand Down

0 comments on commit 9e9cb0a

Please sign in to comment.