Package detail

@coldboy002/pug-lint-config

coldboy002118MIT1.0.0

Shareable pug-lint config

puglint, puglintconfig, pug-lint, pug-lint config

readme

@coldboy002/pug-lint-config

NPM version

A sharable pug-lint config for linting pug files.

Installation

The peer dependencies pug-lint must be installed alongside this package.

npm

npm install -D @coldboy002/pug-lint-config

or

yarn:

yarn add -D @coldboy002/pug-lint-config

Usage

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

  1. Install the pug-lint extension for VS Code.
  2. Enable the linter in VS Code settings.
  3. Install pug-lint and this config in your project following the Installation section.
  4. Add a pug-lint configuration file (.pug-lintrc.*) and extend it with this shareable config following the Usage section.

FAQ

Changelog

License