Repository navigation
Stricter lint rules, unused-code checks, editor and Git defaults, and a weekly link check #180
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ab15644
Set ten Biome rules to error, and fix what they find
lwwmanning fb8b1c1
Add editor and Git defaults and a PR template, and clear stale toolin…
lwwmanning 2eed037
Check the blog's external links each week
lwwmanning 60e1c00
Check the links in links.ts too
lwwmanning eb34895
Correct the note on lychee's --extensions
lwwmanning 897f0b1
Order bench's CSS by specificity, and require a reason for !important
lwwmanning 6a60b48
Replace non-null assertions, and turn on noNonNullAssertion
lwwmanning a6dc090
Add knip, and remove the unused exports it found
lwwmanning b7c2a0c
Document the three new lint rules and knip
lwwmanning File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Editor defaults for files Biome does not format (Markdown, YAML, SQL, shell, | ||
| # and Python). Biome reads this file too, but biome.json's settings win. | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_style = space | ||
| indent_size = 2 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.py] | ||
| indent_size = 4 | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
| # The license texts stay as REUSE downloaded them. | ||
| [LICENSES/**] | ||
| charset = unset | ||
| end_of_line = unset | ||
| indent_style = unset | ||
| indent_size = unset | ||
| insert_final_newline = unset | ||
| trim_trailing_whitespace = unset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Store text files with LF endings, on every platform. | ||
| * text=auto eol=lf | ||
|
|
||
| # The license texts stay byte for byte as REUSE downloaded them. | ||
| LICENSES/** -text | ||
|
|
||
| # Generated or vendored: collapse them in diffs and leave them out of the | ||
| # language statistics. | ||
| bun.lock linguist-generated | ||
| src/vendor/** linguist-vendored |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| ## What changes | ||
|
|
||
| <!-- What a reader of the site, or a contributor, sees. Name the site: vortex.dev, bench, or both. --> | ||
|
|
||
| ## How it was checked | ||
|
|
||
| <!-- The commands you ran and what you looked at. For a visual change, add before and after screenshots. --> | ||
|
|
||
| - [ ] Every commit is signed off (`git commit -s`), for the DCO check. | ||
| - [ ] `bun run check:ci` passes. | ||
| - [ ] Each new image or other asset has an annotation in `REUSE.toml`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: Links | ||
|
|
||
| # Checks the external links in the blog: the posts in src/content/blog and the | ||
| # posts on other sites that the blog index lists (src/content/links.ts). | ||
| # `bun run verify` already checks the site's internal links on every PR. | ||
| # | ||
| # Not a required check, so a broken link never blocks a merge. It runs: | ||
| # - weekly, because a page on another site can disappear at any time | ||
| # - on a PR that changes the blog's content, to catch a mistyped link | ||
| # - by hand (workflow_dispatch) | ||
| # The job summary lists each broken link. | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 9 * * 1" | ||
| pull_request: | ||
| paths: | ||
| - "src/content/**" | ||
| - ".github/workflows/links.yml" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: links-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lychee: | ||
| name: External links | ||
| runs-on: ubuntu-26.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| # The action downloads the lychee binary named by lycheeVersion from | ||
| # lychee's GitHub releases. The job has read-only contents access and no | ||
| # secrets, so that binary can read only the public repository. | ||
| # | ||
| # Excluded hosts block automated requests, so they fail when the page is | ||
| # there: LinkedIn answers 999, and the ACM Digital Library (doi.org | ||
| # 10.1145) answers 403. The action passes the job's GitHub token, which | ||
| # raises GitHub's rate limit. lychee 0.24.2 checks a file named here | ||
| # whatever its extension (the run counts 106 links with or without | ||
| # --extensions). The flag names `ts` anyway, because lychee's default | ||
| # extension list, which filters what it finds in directories, has no | ||
| # `ts`. | ||
| - name: Check links | ||
| uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 | ||
| with: | ||
| lycheeVersion: v0.24.2 | ||
| args: >- | ||
| --no-progress | ||
| --max-retries 3 | ||
| --timeout 30 | ||
| --accept 200..=299,429 | ||
| --extensions mdx,ts | ||
| --exclude '^https://(www\.)?linkedin\.com/' | ||
| --exclude '^https://doi\.org/10\.1145/' | ||
| --exclude '^https://dl\.acm\.org/' | ||
| 'src/content/**/*.mdx' | ||
| src/content/links.ts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "recommendations": ["tailwindcss.tailwindcss-intellisense", "biomejs.biome"] | ||
| "recommendations": ["biomejs.biome"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.