Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: pugjs/pug-lint, 228 sao, JavaScript. An unopinionated and configurable linter and style checker for Pug
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
If you use SublimeLinter 3 with Sublime Text 3, you can install the
SublimeLinter-pug-lint
plugin using Package Control.
Atom
If you use Atom, you can install the linter-pug package.
VS Code
If you use VS Code, you can install the vscode-puglint extension.
Vim
pug-lint is part of syntastic.
If you are using vim-plug to manage your
Vim plugins (recommended), you can do:
" In your ~/.vimrc
Plug 'scrooloose/syntastic'
" Then run these commands
:source %
:PlugInstall
Then to turn the pug linter on, you will need this line in your .vimrc.
let g:syntastic_pug_checkers = ['pug_lint']
Build system integration
Gulp
If you're using Gulp as your build system, you can use gulp-pug-linter for easier integration.
Grunt
If you're using Grunt as your build system, you can use grunt-puglint for easier integration.
Configuration file
Options and rules can be specified in a .pug-lintrc, .pug-lintrc.js, or .pug-lintrc.json file, or via adding a "pugLintConfig" option to package.json.
Options
preset deprecated
Presets have been deprecated in favour of extending configuration files.
Instructions for those wishing to continue to use the rules defined in the deprecated clock preset can be found at https://github.com/pugjs/pug-lint/issues/80#issuecomment-223283681
extends
Type: string
If you want to extend a specific configuration file, you can use the extends property and specify the path to the file. The path can be either relative or absolute
Configurations can be extended by using:
JSON file
JS file
Shareable configuration package
The extended configuration provides base rules, which can be overridden by the configuration that references it. For example:
You can also extend configurations using shareable configuration packages. To do so, be sure to install the configuration package you want from npm and then use the package name, such as:
In this example, the pug-lint-config-myrules package will be loaded as an object and used as the parent of this configuration. You can override settings from the shareable configuration package by adding them directly into your .pug-lintrc file.
You can find config to extend on NPM using "pug-lint-config" query.
Note: You can omit pug-lint-config- and pug-lint will automatically insert it for you
excludeFiles
Type: Array
Default: ["node_modules/**"]
Disables style checking for specified paths declared with glob patterns.
additionalRules
Type: Array
Array of file path matching patterns to load additional rules from, e.g.:
{
"additionalRules": ["project-rules/*.js"]
}
Rules
List of available rules
You can specifically disable any rule by omitting it from your .pug-lintrc config file or by assigning it to null, like so:
{
"disallowBlockExpansion": null
}
Some rules, if enabled at the same time, would be contradictory to one another, such as:
In this case requireSpaceAfterCodeOperator is treated as null, and ignored.
Shareable configuration packages
Shareable configs are simply npm packages that export a configuration object. To start, create a Node.js module like you normally would. Make sure the module name begins with pug-lint-config-, such as pug-lint-config-myconfig. Create a new index.js file and export an object containing your settings:
Once your shareable config is ready, you can publish to npm to share with others. We recommend using the puglint and puglintconfig keywords so others can easily find your module.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/pugjs/pug-lint là nguồn chính thức.
pugjs/pug-lint có phải mã nguồn mở không?
Có — pugjs/pug-lint phát hành theo license ISC, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/pugjs/pug-lint.
pugjs/pug-lint có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho pugjs/pug-lint. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
pugjs/pug-lint dùng license gì?
pugjs/pug-lint phát hành theo license ISC. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
pugjs/pug-lint là gì?
pugjs/pug-lint (pugjs/pug-lint) là dự án JavaScript trên GitHub. Theo mô tả gốc: An unopinionated and configurable linter and style checker for Pug
Đọc đầy đủ README ở tab phía trên.
Chưa chắc pug-lint có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về pug-lint.