Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize code formatting in repository #1783

Merged
merged 19 commits into from
Jul 4, 2024

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Jun 26, 2024

Content

This PR includes a global configuration for the code formatting strategy.

This configuration is managed by Prettier and can be configured in the .prettierc file located at the root of the repository with options.

The Makefiles of mithril-client-wasm/www/, mithril-client-wasm/www-test/, and docs/website/ have been extended with make lint and make format commands.

make lint can also be executed from the root of the repository to facilitate usage and CI checks for the entire repository.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #1754

@dlachaume dlachaume self-assigned this Jun 26, 2024
Copy link

github-actions bot commented Jun 26, 2024

Test Results

    4 files  ±0     52 suites  ±0   8m 38s ⏱️ -16s
1 141 tests ±0  1 141 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 307 runs  ±0  1 307 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a91559a. ± Comparison against base commit 70d4fe6.

♻️ This comment has been updated with latest results.

@dlachaume dlachaume force-pushed the dlachaume/1754/lint-markdown-js-files-in-repo branch from dea726d to cc182ae Compare June 26, 2024 15:26
@dlachaume dlachaume force-pushed the dlachaume/1754/lint-markdown-js-files-in-repo branch 2 times, most recently from 73aa9c4 to c8fd276 Compare June 26, 2024 16:27
@dlachaume dlachaume force-pushed the dlachaume/1754/lint-markdown-js-files-in-repo branch 5 times, most recently from 18aadd6 to fa0d227 Compare July 4, 2024 09:31
@dlachaume dlachaume temporarily deployed to testing-sanchonet July 4, 2024 09:38 — with GitHub Actions Inactive
@dlachaume dlachaume changed the title Standardize Javascript and Markdown code formatting Standardize code formatting in repository Jul 4, 2024
@dlachaume dlachaume temporarily deployed to testing-sanchonet July 4, 2024 10:08 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet July 4, 2024 10:09 — with GitHub Actions Inactive
@dlachaume dlachaume marked this pull request as ready for review July 4, 2024 10:11
@dlachaume dlachaume marked this pull request as draft July 4, 2024 10:13
@dlachaume dlachaume marked this pull request as ready for review July 4, 2024 10:40
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

- Add code formatting verification in the `check` step of the CI
- Remove `Check explorer` in `build-test-explorer` job, since the `make lint` command is executed by the `check` job
- Add `check` job require for `publish-docs`
- Add global `.prettierignore`
By running `make format`
By running `make format`
By running 'make format'
The parameters `snapshot_bucket_name` and `snapshot_bucket_name` had additional information that was not displayed because it was included in a missing column of the table.
Other extra columns were included in the other commands tables
@dlachaume dlachaume force-pushed the dlachaume/1754/lint-markdown-js-files-in-repo branch from 58105d2 to a91559a Compare July 4, 2024 15:37
@dlachaume dlachaume temporarily deployed to testing-sanchonet July 4, 2024 15:44 — with GitHub Actions Inactive
@dlachaume dlachaume merged commit e38d6b7 into main Jul 4, 2024
40 checks passed
@dlachaume dlachaume deleted the dlachaume/1754/lint-markdown-js-files-in-repo branch July 4, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint Markdown/JavaScript files in repository
4 participants