@coldboy002/pug-lint-config
A sharable pug-lint config for linting
pugfiles.
Installation
The peer dependencies pug-lint must be installed alongside this package.
npm
npm install -D @coldboy002/pug-lint-configor
yarn:
yarn add -D @coldboy002/pug-lint-configUsage
Add the pugLintConfig field to your package.json file:
"pugLintConfig": {
"extends": "@coldboy002/pug-lint-config"
}Or create a pug-lint config file type of your choice in the root folder of your project:
.pug-lintrc or .pug-lintrc.json
{
"extends": "@coldboy002/pug-lint-config"
}.pug-lintrc.js
module.exports = {
extends: '@coldboy002/pug-lint-config',
};Extending the config
You can specify additional rules and override or turn off already set ones.
For example, to change the validateIndentation rule to specify a different indentation, turn off the requireStrictEqualityOperators rule and add the validateDivTags rule:
{
"extends": "@coldboy002/pug-lint-config",
"requireStrictEqualityOperators": null,
"validateDivTags": true,
"validateIndentation": 4
}Check out this page for more details about configuring pug-lint.
Integration with VS Code
- Install the pug-lint extension for VS Code.
- Enable the linter in VS Code settings.
- Install
pug-lintand this config in your project following the Installation section. - Add a pug-lint configuration file (
.pug-lintrc.*) and extend it with this shareable config following the Usage section.