Skip to content

chore: introduce eslint-plugin-spellcheck#2603

Closed
Shinigami92 wants to merge 2 commits intovitejs:mainfrom
Shinigami92:introduce-spellcheck
Closed

chore: introduce eslint-plugin-spellcheck#2603
Shinigami92 wants to merge 2 commits intovitejs:mainfrom
Shinigami92:introduce-spellcheck

Conversation

@Shinigami92
Copy link
Member

I added eslint-plugin-spellcheck and configured it (a bit)
Then I fixed some typos f7d69f4

Also I renamed some wordings 1675b3c
If preferred I can revert the renames

It's also arguable if you want eslint-plugin-spellcheck in the project and have such a "huge" config of words
I may contact @aotaduy so they can adept some common words. That could also help other projects out there 🙂

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

I am not sure if introducing an eslint-plugin could be a bit overkill. But in general, I think this is a good PR as it will reduce the future typo-fix commits noises a lot.

@patak-cat
Copy link
Member

My first reaction was to reject it because of renames like segs to segments, but I imagine that we could live with longer variable names or even add the most commonly used short versions to the skip list.

I also think that this would be positive. Is there something similar for markdown files so the docs are checked?

@Shinigami92
Copy link
Member Author

I also think that this would be positive. Is there something similar for markdown files so the docs are checked?

I'm not directly sure. Currently it may be possible to configure eslint to not only check js,ts etc.
But (if it is possible) we should do this in a further step/issue/pr.

@patak-cat patak-cat added the p1-chore Doesn't change code behavior (priority) label Mar 19, 2021
@antfu
Copy link
Member

antfu commented Mar 19, 2021

For the plugin, I'd actually prefer one-time CLI tools or IDE extensions as I don't think spell check is something that important to persistent live in the CI process. We can run spell check once a while and fix them in a single commit so we don't need to sacrifice anything while keeping the commit history cleaner.

@Shinigami92
Copy link
Member Author

A nice thing using the lint step could be to show it directly in the review
I opened a discussion about that here: #2604


There is a VSCode Plugin: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
But it differs a bit and know some other worlds as the lint plugin


We could extract an additional lint script that specifically lint the project for spell-check. But in the end it is kinda the same as just running it in the normal lint step and otherwise folks would just forget to run it / the forget it.

@yyx990803
Copy link
Member

For the plugin, I'd actually prefer one-time CLI tools or IDE extensions as I don't think spell check is something that important to persistent live in the CI process. We can run spell check once a while and fix them in a single commit so we don't need to sacrifice anything while keeping the commit history cleaner.

^ I agree with this - we could just run a typecheck tool once in a while. I don't really want spellcheckers to lint/affect source code variable names.

@Shinigami92 Shinigami92 marked this pull request as draft March 23, 2021 14:37
@Shinigami92 Shinigami92 mentioned this pull request Mar 26, 2021
9 tasks
@antfu
Copy link
Member

antfu commented Jun 3, 2021

@Shinigami92 Maybe let's close this for now?

@Shinigami92 Shinigami92 closed this Jun 3, 2021
@Shinigami92 Shinigami92 deleted the introduce-spellcheck branch June 3, 2021 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p1-chore Doesn't change code behavior (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants