You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this ends up being buggy because I have to physically create a "cspell.temp.config.jsonc" file on disk, which causes the Git tree to become dirty and screws up other lint tasks that are running parallel. I also can't move the temporary config to a temporary directory, since this will mess up all the no-longer-relative paths in the "ignorePaths" part of the config.
Thus, I would just like to use the CSpell API to invoke this command through JavaScript/TypeScript.
First, I tried using cspell-lib, but that looks to be too low level, as I can't feed it a CSpell configuration file.
Second, I tried using the lint export from cspell, but that does not work either, as LinterCliOptions does not seem to include "words-only" and "unique" (although it does include "progress" and "summary", which is helpful). Furthermore, it only seems to take "config" as a path instead of "config" as an JavaScript object.
Solution
Proposal:
Add the following fields to LinterCliOptions:
configObject
wordsOnly
unique
Alternate Solutions
Ultimately, I would love for unused word checking to become a feature of CSpell itself. Then I wouldn't need to invoke the CSpell API at all and I could archive this repository.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Problem
I am the author of
cspell-check-unused-words
.In the script, it runs the following command:
However, this ends up being buggy because I have to physically create a "cspell.temp.config.jsonc" file on disk, which causes the Git tree to become dirty and screws up other lint tasks that are running parallel. I also can't move the temporary config to a temporary directory, since this will mess up all the no-longer-relative paths in the "ignorePaths" part of the config.
Thus, I would just like to use the CSpell API to invoke this command through JavaScript/TypeScript.
cspell-lib
, but that looks to be too low level, as I can't feed it a CSpell configuration file.lint
export fromcspell
, but that does not work either, asLinterCliOptions
does not seem to include "words-only" and "unique" (although it does include "progress" and "summary", which is helpful). Furthermore, it only seems to take "config" as a path instead of "config" as an JavaScript object.Solution
Proposal:
Add the following fields to
LinterCliOptions
:configObject
wordsOnly
unique
Alternate Solutions
Ultimately, I would love for unused word checking to become a feature of CSpell itself. Then I wouldn't need to invoke the CSpell API at all and I could archive this repository.
Code of Conduct
The text was updated successfully, but these errors were encountered: