4 Commits

Author SHA1 Message Date
Jairo Llopis
67cc4ffde3
feat: nix support
- Provide a dev shell.
- Provide a nix package.
- Provide a nix flake.
- Development environment based on direnv.
- Docs.
- Configure Gitpod to use direnv and nix.
- Configure Cachix out of the box, and document how to use it.
- Add direnv and nix to CI.
- Satisfy some linters that came from Precommix, even when Precommix was later discarded.
- Mark some tests as impure.
- Run only pure tests when building Copier with Nix.
- Add poetry loader to direnv.
- Update contribution guide.
2023-01-18 09:40:08 +00:00
Jairo Llopis
63842f5087
Add proseWrap: always to prettier configuration, and re-run pre-commit
This makes YAML and MD files to be automatically wrapped when possible and when it doesn't alter the content meaning. All looks better this way.
2020-04-08 12:01:06 +01:00
Jairo Llopis
f8673465ba
Improve autoformatting
Continues the job started in #104:

- Configure more languages for VSCode to format on save.
- Recommend extensions for VSCode.
- Remove settings from `.prettierrc.yml` that are duplicated in `.editorconfig` (which prettier uses by default).
2020-01-09 13:34:57 +00:00
Jairo Llopis
a549638c3c Add pre-commit
For those new to pre-commit, tl;dr:

- `pre-commit install` will enable a git hook to forbid committing violating code.
- If `git commit` fails, just `git commit -a` again.

This beautiful tool will convert all our source code to a pleasure to be read and written.

Some insights:

- `make install` now enables pre-commit by default.
- Important hooks:
  - Black, the 21th century Python code autoformatter.
  - isort, to sort imports automatically.
  - mypy, which was also being used anyways.
  - Prettier, for non-python files (markdown and YAML in this repo).
  - Flake8 with bugbear, which reveals some extra coding mistakes.
  - Other common checkers & fixers.
- Used as linter in travis.
- Replaced `make flake` for `make lint`.
2019-12-10 11:45:41 +00:00