John Bampton
|
a7c947360e
|
[CI] Add prettier to pre-commit
Add `.prettierignore` and the `.prettierrc` config file. Prettier is currently targeting the `JSON`, `Markdown` and `YAML` files in the mruby repo.
Additional file types can be targetted with prettier via additional community plugins.
https://prettier.io/docs/en/
You can see all the languages that are supported on the homepage:
https://prettier.io/
This PR references a few other issues and PRs
We did have prettier running with pre-commit before that method was removed from prettier.
https://github.com/mruby/mruby/pull/6292
https://github.com/mruby/mruby/issues/6291
https://github.com/mruby/mruby/issues/6138
https://github.com/mruby/mruby/pull/5490
Perhaps we could add more npm software to pre-commit in future using new the `local` repo approach.
https://pre-commit.com/#repository-local-hooks
The best part is that it runs with pre-commit on our local machines on `git commit` and also when running `pre-commit run --all-files` or for example when running `make check`.
There were also some minor fixes / style changes in the pre-commit config to standardize casing.
https://www.npmjs.com/package/prettier?activeTab=readme
|
2024-11-20 14:51:11 +10:00 |
|