vscode-puglint
This linter plugin for VS Code provides an interface to pug-lint.
Installation
Linter installation is performed in several stages:
- Install pug-lint use
npm i -D pug-lint
or npm i -g pug-lint
.
- Press F1 and select
Extensions: Install Extensions
.
- Search and choose
vscode-puglint
.
See the extension installation guide for details.
Usage
Enable the linter in the VS Code settings.
{
"puglint.enable": true
}
Configurations
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 the package.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
{}
Supported languages
Supported settings
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
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
Changelog
See the Releases section of our GitHub project for changelogs for each release version.
License
This software is released under the terms of the MIT license.