Skip to content

Commit

Permalink
Update docs (#1411)
Browse files Browse the repository at this point in the history
* Replace references to eslint with biome

* Simplify pipeline docs commands

* Update splash image

* Use relative doc paths
  • Loading branch information
robines authored Oct 9, 2024
1 parent dace444 commit 0e53f41
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

## Documentation

- **[Technical Documentation](/docs/technical/README.md)**
- [Work Methodology](/docs/work-methodology.md)
- [Useful Commands](/docs/useful-commands.md)
- [Technologies used on Samf4 🤖](/docs/technical/Samf4Tech.md)
- [Project Specific Commands](/docs/docker-project-specific-commands.md)
- [Useful Docker aliases](/docs/docker-project-specific-commands.md)
- [🌐 API documentation](/docs/api-docs.md)
- **[Technical Documentation](./docs/technical/README.md)**
- [Work Methodology](./docs/work-methodology.md)
- [Useful Commands](./docs/useful-commands.md)
- [Technologies used on Samf4 🤖](./docs/technical/Samf4Tech.md)
- [Project Specific Commands](./docs/docker-project-specific-commands.md)
- [Useful Docker aliases](./docs/docker-project-specific-commands.md)
- [🌐 API documentation](./docs/api-docs.md)

## Installation

Expand Down
6 changes: 3 additions & 3 deletions docs/docker-project-specific-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ docker compose exec frontend bash
```bash
exit
```
🐳Eslint check
🐳Biome check
```bash
yarn run eslint:check
#runs eslint, like in GitHub Actions pipeline, but in Docker
yarn biome:check
#runs Biome, like in GitHub Actions pipeline, but in Docker
```
🐳Stylelint check
```bash
Expand Down
Binary file modified docs/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/technical/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
- [Role System](/docs/technical/backend/rolesystem.md)

### Pipelines & Deployment
- [Pipeline (mypy, eslint, tsc, ...)](/docs/technical/pipeline.md)
- [Pipeline (mypy, biome, tsc, ...)](/docs/technical/pipeline.md)
6 changes: 2 additions & 4 deletions docs/technical/Samf4Tech.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,15 @@ To make the code we write on the project high quality, have a standardised forma
#### Frontend 🎨🧭

For frontend we use the formatter Prettier, which formats the code in a standardised way.
Linters are software that analyses code to detect errors, bugs or stylistic inconsistency. Hence we use linter as tools to write better, more high quality code. In frontend we use ESlint for React and stylelint for CSS/SASS.
Linters are software that analyses code to detect errors, bugs or stylistic inconsistency. Hence we use linter as tools to write better, more high quality code. In frontend we use Biome for React and stylelint for CSS/SASS.

**This next paragraph is only applicable if you use VScode:**
To use our code format and linting rules you have to configure a JSON file locally, and of course have the tools installed in your IDE. After installing the project and getting it to run, you need to copy [this JSON file](/.vscode/settings.emil.json), paste it into the same folder, and rename it to 'settings.json'.

When installing the project for the first time you will have the option to install Prettier and ESlint in VSCode. Stylelint is easily found in VSCode extensions.
When installing the project for the first time you will have the option to install Biome in VSCode. Stylelint is easily found in VSCode extensions.

When you push code to the main branch it will be checked automatically (by [GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions)) to chech if it follows the formatting and linting rules we use. It is also useful to know that these checks can be run locally by commands in the terminal, which are found in [Useful commands](/docs/useful-commands.md), but it it might be more convenient to run them inside the [frontend docker container in a Bash terminal.](/docs/docker-project-specific-commands.md)

If you want you can also read the [prettier](https://prettier.io/), [eslint](https://eslint.org/) or [stylelint](https://stylelint.io/) documentation, but this might not be necessary. These tools will give you indication of why your code breaks the rules, and you can see how your code should be written by hovering over the indications.

#### Backend ⚙️

In backend we use the Python formatter [yapf](https://pypi.org/project/yapf/) because it is a formatter that offers multiple popular Python formats and standards. The format is configured in a Python file in backend.
Expand Down
12 changes: 6 additions & 6 deletions docs/technical/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ At the bottom of each section is a link to a comprehensive collection of all com

## Frontend

_Install yarn_
_Install dependencies_

```
yarn install
yarn
```

_Run Biome_

```
yarn run biome:ci
yarn biome:ci
```

_fix biome_

```
yarn run biome:fix
yarn biome:fix
```

_Run Stylelint_

```
yarn run stylelint:check
yarn stylelint:check
```

_Run typescript compiler check_

```
yarn run tsc:check
yarn tsc:check
```

Didnt find what you were looking for? See all backend commands [here](../../frontend/package.json)
Expand Down

0 comments on commit 0e53f41

Please sign in to comment.