Skip to content
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

Add codespell support (config, workflow to detect/not fix) and make it fix few typos #64

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ repos:
- [email protected]
- eslint-plugin-react

# Lint: Find known typos
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in pyproject.toml
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it autofix as well? That's what I generally do for all pre-commit hooks! I think we ended up adding it to the infra repo as well! https://github.com/2i2c-org/infrastructure/blob/464d556c4ea931a6761d6702c444d5c2ded9203d/.pre-commit-config.yaml#L69

- tomli

# pre-commit.ci config reference: https://pre-commit.ci/#configuration
ci:
autoupdate_schedule: monthly
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The primary contents are:
`HTML` for constructing the form itself. This can contain multiple templates
that are composed together using all of jinja2's composition features (like `include`)
2. `src/` contains JS and CSS that are packaged via standard frontend bundling
tools (`webpack` and `babel`), outputing assets into `jupyterhub_fancy_profiles/static/`.
tools (`webpack` and `babel`), outputting assets into `jupyterhub_fancy_profiles/static/`.
This allows us to use _standard_ frontend tooling to write JS & CSS - for
example, [xterm.js](http://xtermjs.org/) can be used without many complications.

Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ version_file = "jupyterhub_fancy_profiles/_version.py"
[tool.setuptools.packages.find]
where = [""]
include = ["jupyterhub_fancy_profiles*"]

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,package-lock.json,*.css'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''
2 changes: 1 addition & 1 deletion src/ImageBuilder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function ImageBuilder({ name }) {
});
};

// We render everything, but only toggle visibility based on wether we are being
// We render everything, but only toggle visibility based on whether we are being
// shown or hidden. This provides for more DOM stability, and also allows the image
// to continue being built evn if the user moves away elsewhere. When hidden, we just
// don't generate the hidden input that posts the built image out.
Expand Down
Loading