0.2.1 • Published 5 years ago
htmllinter-plugin-stylelint v0.2.1
htmllinter-plugin-stylelint
htmllinter plugin to lint css inside of style tags using stylelint
Installation
yarn add htmllinter-plugin-stylelint --devUsage
In your htmllinter.config.js file, include this module in plugin property
htmllinter.config.js
module.exports = {
plugins: [require('htmllinter-plugin-stylelint')],
rules: {
stylelint: 'on',
},
};Configuration of Stylelint rules and config
We are using stylelint node api which accepts some option.
Refer here for the options
We dont accept the
filesas bothcodeand this cant be used together
You can pass these options from htmllinter.config.js 's rules property
Example :
// htmllinter.config.js
module.exports = {
plugins: [require('htmllinter-plugin-stylelint')],
rules: {
stylelint: [
'on',
{
config: {
rules: {
indentation: false,
},
},
},
],
},
};