We're looking to add pre-commit across our libraries. This is a first run to see how it would work for us.
How was it fixed?
Add pre-commit to dev dependencies and create .pre-commit-config.yaml
Remove all lint deps
Bump all lint tools up to the latest version, add mdformat for .md file linting.
Change our .yml files to .yaml because pre-commit chooses not to accept .ymlgrumble grumble, except for .circleci/config.yml, because circle doesn't accept .yaml desk flip
(It will check.yml files without any extra coaxing, it just won't accept it as a config file, unless you install it with pre-commit install --config .pre-commit-config.yml)
Using pre-commit removes the concept of a lint-check, it's all lint-roll.
Installing pre-commit becomes part of the standard dev setup, right after pip install -e ".[dev]"
Todo:
[x] Test when pre-commit is not installed locally, but the commit does have issues that get caught in CI
[x] Add pre-commit install to dev setup instructions
[x] Clean up commit history
[x] Add or update documentation related to these changes
What was wrong?
We're looking to add pre-commit across our libraries. This is a first run to see how it would work for us.
How was it fixed?
pre-commit
to dev dependencies and create.pre-commit-config.yaml
mdformat
for.md
file linting..yml
files to.yaml
becausepre-commit
chooses not to accept.yml
grumble grumble, except for .circleci/config.yml, because circle doesn't accept .yaml desk flip (It will check.yml
files without any extra coaxing, it just won't accept it as a config file, unless you install it withpre-commit install --config .pre-commit-config.yml
)Using pre-commit removes the concept of a lint-check, it's all lint-roll. Installing pre-commit becomes part of the standard dev setup, right after
pip install -e ".[dev]"
Todo:
[x] Test when pre-commit is not installed locally, but the commit does have issues that get caught in CI
[x] Add pre-commit install to dev setup instructions
[x] Clean up commit history
[x] Add or update documentation related to these changes
[x] Add entry to the release notes
Cute Animal Picture