This linter plugin for VS Code provides an interface to pug-lint.
Linter installation is performed in several stages:
- Install pug-lint use
npm i -D pug-lint
ornpm i -g pug-lint
. - Press F1 and select
Extensions: Install Extensions
. - Search and choose
vscode-puglint
.
See the extension installation guide for details.
Enable the linter in the VS Code settings.
{
"puglint.enable": true
}
The plugin supports the following files:
.jade-lintrc
or.jade-lint.json
.pug-lintrc
,.pug-lintrc.js
,.pug-lintrc.json
or.pug-lint.json
pugLintConfig
section in thepackage.json
file
The rules for determining the configuration file:
- Editor settings
- Workspace config (current project)
- Package file (current project)
- Global config ($HOME directory)
- Default config
{}
- Pug
- Jade
puglint.enable
- Type:
Boolean
- Default:
false
Control whether puglint is enabled for Pug/Jade files or not.
puglint.run
- Type:
String
- Default:
onType
- Supported values:
onType
,onSave
Run the linter on save (onSave) or on type (onType).
puglint.config
- Type:
Object
- Default:
{}
Will be directly passed to config option.
For example:
{
"puglint.enable": true,
"puglint.config": {
"requireClassLiteralsBeforeIdLiterals": true
}
}
Examples for use extends
(don't forget to install config, for example pug-lint-config-clock
):
{
"puglint.enable": true,
"puglint.config": {
"extends": "clock"
}
}
More information: pug-lint: extends
See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.