-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add a pre-commit hook #8
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ali Sajid Imami <[email protected]>
For what tool we need this YAML file? Can you explain me a little more? |
This yaml implementation is a part of the You can see the following pre-commit enabled repositories: The repos:
repo: https://github.com/browserslist
hooks:
- id: browserslist-lint |
Co-authored-by: Andrey Sitnik <[email protected]>
@@ -25,6 +25,15 @@ Rules: | |||
alt="Sponsored by Evil Martians" width="236" height="54"> | |||
</a> | |||
|
|||
## Pre-Commit Hook | |||
|
|||
This project is also available as a pre-commit hook. Please add the following to your pre-commit configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s add link here. pre-commit
is a popular name, there are many projects with this name. People will now understand it without a link.
|
||
```yaml | ||
repos: | ||
- repo: https://github.com/browserslist/lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s use 2 space indents to have consistent code style
This pull request introduces a pre-commit hook for validating Browserslist configurations. The most important changes include the addition of a configuration file for the pre-commit hooks. There are also relevant additions to the
README.md
.Pre-commit hook addition:
pre-commit-hooks.yaml
: Defined a new hook,browserslist-lint
, to validate Browserslist configurations usingnpx browserslist-linter
. This hook is triggered by changes to.browserslistrc
orpackage.json
.Documentation updates:
README.md
: Added a section on the pre-commit hook, including instructions on how to add it to the pre-commit configuration.