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

feat: pre-fill cspell.json words #1734

Merged
merged 24 commits into from
Dec 4, 2024
Merged

feat: pre-fill cspell.json words #1734

merged 24 commits into from
Dec 4, 2024

Conversation

JoshuaKGoldberg
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg commented Dec 3, 2024

PR Checklist

Overview

Removes the populateCSpellDictionary call from creation. It was already not in initialization.

💖

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

"knip",
+ "markdownlint",
"markdownlintignore",
"mtfoley",
"npmignore",
- "npmpackagejsonlintrc",
"outro",
- "packagejson",
Copy link
Owner Author

Choose a reason for hiding this comment

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

I broke this in some PR recently and figured I'd just fix it in this one. 😄

@JoshuaKGoldberg
Copy link
Owner Author

OH I think I just figured out the back-and-forth with the cspell files. migrate-test-e2e.ts.snap is having spell-checking run on it! 😂

@JoshuaKGoldberg
Copy link
Owner Author

In one of the two forms, pnpm lint:spelling doesn't report a complaint on execa...?!

@JoshuaKGoldberg
Copy link
Owner Author

$ pnpm lint:spelling

> [email protected] lint:spelling /Users/josh/repos/create-typescript-app
> cspell "**" ".github/**/*"

 14/201 script/__snapshots__/migrate-test-e2e.ts.snap 4.84ms X
script/__snapshots__/migrate-test-e2e.ts.snap:85:5 - Unknown word (contributorsrc)
script/__snapshots__/migrate-test-e2e.ts.snap:86:5 - Unknown word (execa)
CSpell: Files checked: 201, Issues found: 2 in 1 file.
 ELIFECYCLE  Command failed with exit code 1.

What I don't understand is why pnpm lint:spelling is only picking up these complaints from the snapshot files. Both of those two words appear in plenty of files.

@JoshuaKGoldberg
Copy link
Owner Author

JoshuaKGoldberg commented Dec 3, 2024

TIL. The default dictionaries for a file change based on the file's extension. .snap doesn't include many of the defaults that come for .ts, etc.

Relevant:

@JoshuaKGoldberg JoshuaKGoldberg merged commit 8bcd8f6 into main Dec 4, 2024
17 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the cspell-prefill branch December 4, 2024 01:27
Copy link

🎉 This is included in version v1.77.0 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant