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
It should not report "Unknown word"s when the variable comes from an external source. For example:
I installed a npm package (node_modules) and import it into Angular. In this case cSpell should ignore what.
We could define some paths to ignore the source. To be neutral to the workspace. And set some defauls like "node_modules".
I don't know how cSpell works. I guess cSpell currently have no way to know where a variable comes from.
I don't want to set this word into my ignore list. It's would be better if we can ignore that node_modules.
Btw. The ESLint plugin TypeScript Naming Convention can detect external libs and ignores it. Maybe this helps? But I have no idea how cSpell works and how to implement such feature.
I know the setting cSpell.ignorePaths. And there is already set nore_modules. But this does not work with imported variables.
My current workaround is to ignore all imports by adding this to the ignoreRegExpList: "^import.+$"
I could add more details to this regex to be more unique. ...
I think this is ok, since I still see spelling issues on the related files.
But note: This does not fix the further use of an external imported variable. This is only a solution for the import itself.
And this workaround also obfuscates issues in file names. Ok, this could be fixed by check for dots in path too. External imports does not have a dot after the quote (this is not 100% the truth I know. You also can have absolute path. Therefore e.g. src). Like "^import((?!src|\\.).)*$"
The text was updated successfully, but these errors were encountered:
It should not report "Unknown word"s when the variable comes from an external source. For example:
I installed a npm package (node_modules) and import it into Angular. In this case cSpell should ignore what.
We could define some paths to ignore the source. To be neutral to the workspace. And set some defauls like "node_modules".
I don't know how cSpell works. I guess cSpell currently have no way to know where a variable comes from.
I don't want to set this word into my ignore list. It's would be better if we can ignore that node_modules.
Btw. The ESLint plugin TypeScript Naming Convention can detect external libs and ignores it. Maybe this helps? But I have no idea how cSpell works and how to implement such feature.
I know the setting
cSpell.ignorePaths
. And there is already setnore_modules
. But this does not work with imported variables.My current workaround is to ignore all imports by adding this to the
ignoreRegExpList
:"^import.+$"
I could add more details to this regex to be more unique. ...
I think this is ok, since I still see spelling issues on the related files.
But note: This does not fix the further use of an external imported variable. This is only a solution for the import itself.
And this workaround also obfuscates issues in file names. Ok, this could be fixed by check for dots in path too. External imports does not have a dot after the quote (this is not 100% the truth I know. You also can have absolute path. Therefore e.g.
src
). Like"^import((?!src|\\.).)*$"
The text was updated successfully, but these errors were encountered: