EGI-Federation / documentation

Sources to build EGI documentation site.
https://docs.egi.eu/
MIT License
14 stars 48 forks source link

chore: add pre-commit hooks and prettier config #636

Closed brucellino closed 8 months ago

brucellino commented 8 months ago

Summary

This adds pre-commit hooks and a few configuration files for enforcing style guides.

Specific hooks are:

  1. prettier -- format code before it's committed to respect the language standard it's written in.
  2. check-jsonschema -- ensure that Github Action workflows respect the schema
  3. markdown-link-check -- check links on changed markdown files

Related issue : #635 #157

github-actions[bot] commented 8 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (2)

prettierrc toml

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:brucellino/egi-documentation.git](https://github.com/brucellino/egi-documentation.git) repository on the `main` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/EGI-Federation/documentation/actions/runs/8029151206/attempts/1' ```
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary This includes both **expected items** (5) from .github/actions/spelling/expect.txt and **unrecognized words** (2) Dictionary | Entries | Covers | Uniquely -|-|-|- [cspell:filetypes/filetypes.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/filetypes/filetypes.txt)|264|2|| [cspell:rust/dict/rust.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/rust/dict/rust.txt)|30|1|| [cspell:npm/dict/npm.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/npm/dict/npm.txt)|302|1|| [cspell:fullstack/dict/fullstack.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/fullstack/dict/fullstack.txt)|419|1|| Consider adding them (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml with: extra_dictionaries: cspell:filetypes/filetypes.txt cspell:rust/dict/rust.txt cspell:npm/dict/npm.txt cspell:fullstack/dict/fullstack.txt ``` To stop checking additional dictionaries, add (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml check_extra_dictionaries: '' ```
Errors (2) See the [:open_file_folder: files](https://github.com/EGI-Federation/documentation/pull/636/files/) view, the [:scroll:action log](https://github.com/EGI-Federation/documentation/actions/runs/8029151206/job/21935110132#step:4:1), or [:memo: job summary](https://github.com/EGI-Federation/documentation/actions/runs/8029151206/attempts/1#summary-21935110132) for details. [:x: Errors](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:x: check-file-path](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#check-file-path) | 2 [:information_source: noisy-file-list](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#noisy-file-list) | 1 See [:x: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
github-actions[bot] commented 8 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (2)

prettierrc toml

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:brucellino/egi-documentation.git](https://github.com/brucellino/egi-documentation.git) repository on the `main` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/EGI-Federation/documentation/actions/runs/8029151766/attempts/1' ```
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary This includes both **expected items** (5) from .github/actions/spelling/expect.txt and **unrecognized words** (2) Dictionary | Entries | Covers | Uniquely -|-|-|- [cspell:filetypes/filetypes.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/filetypes/filetypes.txt)|264|2|| [cspell:rust/dict/rust.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/rust/dict/rust.txt)|30|1|| [cspell:npm/dict/npm.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/npm/dict/npm.txt)|302|1|| [cspell:fullstack/dict/fullstack.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/fullstack/dict/fullstack.txt)|419|1|| Consider adding them (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml with: extra_dictionaries: cspell:filetypes/filetypes.txt cspell:rust/dict/rust.txt cspell:npm/dict/npm.txt cspell:fullstack/dict/fullstack.txt ``` To stop checking additional dictionaries, add (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml check_extra_dictionaries: '' ```
Errors (2) See the [:open_file_folder: files](https://github.com/EGI-Federation/documentation/pull/636/files/) view, the [:scroll:action log](https://github.com/EGI-Federation/documentation/actions/runs/8029151766/job/21935111415#step:4:1), or [:memo: job summary](https://github.com/EGI-Federation/documentation/actions/runs/8029151766/attempts/1#summary-21935111415) for details. [:x: Errors](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:x: check-file-path](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#check-file-path) | 2 [:information_source: noisy-file-list](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#noisy-file-list) | 1 See [:x: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
sebastian-luna-valero commented 8 months ago

Good to see this @brucellino!

Could you please update https://docs.egi.eu/about/contributing/git/#run-the-site-locally as well?

Many thanks!

github-actions[bot] commented 8 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (4)

markdownlint tmp workflows yyy

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:brucellino/egi-documentation.git](https://github.com/brucellino/egi-documentation.git) repository on the `main` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/EGI-Federation/documentation/actions/runs/8047189645/attempts/1' ```
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary This includes both **expected items** (5) from .github/actions/spelling/expect.txt and **unrecognized words** (4) Dictionary | Entries | Covers | Uniquely -|-|-|- [cspell:npm/dict/npm.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/npm/dict/npm.txt)|302|2|1| [cspell:aws/aws.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/aws/aws.txt)|218|1|1| [cspell:scala/dict/scala.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/scala/dict/scala.txt)|153|1|| [cspell:filetypes/filetypes.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/filetypes/filetypes.txt)|264|1|| [cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|1|| Consider adding them (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml with: extra_dictionaries: cspell:npm/dict/npm.txt cspell:aws/aws.txt cspell:scala/dict/scala.txt cspell:filetypes/filetypes.txt cspell:node/dict/node.txt ``` To stop checking additional dictionaries, add (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml check_extra_dictionaries: '' ```
Warnings (1) See the [:open_file_folder: files](https://github.com/EGI-Federation/documentation/pull/636/files/) view, the [:scroll:action log](https://github.com/EGI-Federation/documentation/actions/runs/8047189645/job/21975943226#step:4:1), or [:memo: job summary](https://github.com/EGI-Federation/documentation/actions/runs/8047189645/attempts/1#summary-21975943226) for details. [:information_source: Warnings](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:information_source: noisy-file-list](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#noisy-file-list) | 1 See [:information_source: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
github-actions[bot] commented 8 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (4)

markdownlint tmp workflows yyy

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:brucellino/egi-documentation.git](https://github.com/brucellino/egi-documentation.git) repository on the `main` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/EGI-Federation/documentation/actions/runs/8047640763/attempts/1' ```
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary This includes both **expected items** (5) from .github/actions/spelling/expect.txt and **unrecognized words** (4) Dictionary | Entries | Covers | Uniquely -|-|-|- [cspell:npm/dict/npm.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/npm/dict/npm.txt)|302|2|1| [cspell:aws/aws.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/aws/aws.txt)|218|1|1| [cspell:scala/dict/scala.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/scala/dict/scala.txt)|153|1|| [cspell:filetypes/filetypes.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/filetypes/filetypes.txt)|264|1|| [cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|1|| Consider adding them (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml with: extra_dictionaries: cspell:npm/dict/npm.txt cspell:aws/aws.txt cspell:scala/dict/scala.txt cspell:filetypes/filetypes.txt cspell:node/dict/node.txt ``` To stop checking additional dictionaries, add (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml check_extra_dictionaries: '' ```
Warnings (1) See the [:open_file_folder: files](https://github.com/EGI-Federation/documentation/pull/636/files/) view, the [:scroll:action log](https://github.com/EGI-Federation/documentation/actions/runs/8047640763/job/21977318271#step:4:1), or [:memo: job summary](https://github.com/EGI-Federation/documentation/actions/runs/8047640763/attempts/1#summary-21977318271) for details. [:information_source: Warnings](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:information_source: noisy-file-list](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#noisy-file-list) | 1 See [:information_source: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
github-actions[bot] commented 8 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (4)

markdownlint tmp workflows yyy

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:brucellino/egi-documentation.git](https://github.com/brucellino/egi-documentation.git) repository on the `main` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/EGI-Federation/documentation/actions/runs/8047686430/attempts/1' ```
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary This includes both **expected items** (5) from .github/actions/spelling/expect.txt and **unrecognized words** (4) Dictionary | Entries | Covers | Uniquely -|-|-|- [cspell:npm/dict/npm.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/npm/dict/npm.txt)|302|2|1| [cspell:aws/aws.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/aws/aws.txt)|218|1|1| [cspell:scala/dict/scala.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/scala/dict/scala.txt)|153|1|| [cspell:filetypes/filetypes.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/filetypes/filetypes.txt)|264|1|| [cspell:node/dict/node.txt](https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/node/dict/node.txt)|891|1|| Consider adding them (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml with: extra_dictionaries: cspell:npm/dict/npm.txt cspell:aws/aws.txt cspell:scala/dict/scala.txt cspell:filetypes/filetypes.txt cspell:node/dict/node.txt ``` To stop checking additional dictionaries, add (in `.github/workflows/spelling.yml`) for `uses: check-spelling/check-spelling@main` in its `with`: ``` yml check_extra_dictionaries: '' ```
Warnings (1) See the [:open_file_folder: files](https://github.com/EGI-Federation/documentation/pull/636/files/) view, the [:scroll:action log](https://github.com/EGI-Federation/documentation/actions/runs/8047686430/job/21977464668#step:4:1), or [:memo: job summary](https://github.com/EGI-Federation/documentation/actions/runs/8047686430/attempts/1#summary-21977464668) for details. [:information_source: Warnings](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:information_source: noisy-file-list](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#noisy-file-list) | 1 See [:information_source: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
brucellino commented 8 months ago

@sebastian-luna-valero done.

enolfc commented 8 months ago

@brucellino can you fix the super linter errors?