Good day,
In above picture, stylelint prompt a CSS error in a JS file. Is there a way to stop stylelint from validating javascript file, I coundn't find such option in their official configuration guide.
Thanks a lot.
You can also specify a path to your ignore patterns file (absolute or relative to process. cwd() ) using the --ignore-path (in the CLI) and ignorePath (in JS) options. Alternatively, you can add an ignoreFiles property within your configuration object.
The linter can be configured to ignore specific files using the ignoreFiles
property of the stylelint configuration object.
You can try ignoring JavaScript files with:
{
"ignoreFiles": ["**/*.js"],
"rules": { .. }
}
I believe the stylelint Visual Studio Code extension will respect this property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With