Skip to content

Configure cspell filetype #745

Answered by getlost01
justinhj asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it is possible to configure the cspell linter to lint specific file types only or to lint specific parts of a file (e.g., comments, functions, variables).

To configure cspell to lint specific file types only, you can use the --files option and specify a list of file patterns to lint. For example, to lint only JavaScript and TypeScript files, you can use the following command:

cspell --files "*.js,*.ts"

To configure cspell to lint specific parts of a file, you can use the --files option and specify a list of file patterns to lint, followed by the --language option and the language identifier for the parts of the file you want to lint. For example, to lint only comments in JavaScript f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@justinhj
Comment options

Answer selected by justinhj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants