Linting and pre-commit ¶
Formatting ¶
black
provides Python code formatting via the [ms-python.python
][python] VS Code extension.
prettier
provides code formatting for front-end (CSS/JavaScript) via the esbenp.prettier-vscode
VS Code extension.
See the .vscode/settings.json
file for more information on how this is configured in the devcontainer.
Linting ¶
flake8
provides Python code linting via the [ms-python.python
][python] VS Code extension.
See the .vscode/settings.json
file for more information on how this is configured in the devcontainer.
pre-commit ¶
This repository uses pre-commit
hooks to check and format code. The .pre-commit-config.yaml
file defines a
number of pre-commit
hooks, including black
, flake8
, line ending and whitespace checkers, and more.
pre-commit
is installed and activated within the devcontainer and runs automatically with each commit.
Branch protection rules on the environment branches in GitHub ensure that pre-commit
checks have passed before a merge is
allowed. See the workflow file at .github/workflows/pre-commit.yml
.