{"id":13780261,"url":"https://github.com/pugjs/pug-lint","last_synced_at":"2025-05-16T09:00:21.282Z","repository":{"id":34546409,"uuid":"38491004","full_name":"pugjs/pug-lint","owner":"pugjs","description":"An unopinionated and configurable linter and style checker for Pug","archived":false,"fork":false,"pushed_at":"2023-03-21T13:43:24.000Z","size":537,"stargazers_count":228,"open_issues_count":60,"forks_count":51,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-10T22:17:03.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pugjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-07-03T12:11:12.000Z","updated_at":"2025-02-02T15:31:45.000Z","dependencies_parsed_at":"2024-01-15T09:57:51.078Z","dependency_job_id":"71716e99-4fd3-42c8-9860-23f640bf4d09","html_url":"https://github.com/pugjs/pug-lint","commit_stats":{"total_commits":415,"total_committers":24,"mean_commits":"17.291666666666668","dds":"0.17108433734939754","last_synced_commit":"c42970c3625e65698ec48b96263eb2d36d4ff58a"},"previous_names":["pugjs/jade-lint"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugjs%2Fpug-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugjs%2Fpug-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugjs%2Fpug-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugjs%2Fpug-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pugjs","download_url":"https://codeload.github.com/pugjs/pug-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501547,"owners_count":22081526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:01:13.876Z","updated_at":"2025-05-16T09:00:19.466Z","avatar_url":"https://github.com/pugjs.png","language":"JavaScript","funding_links":[],"categories":["Linters"],"sub_categories":["Pug"],"readme":"# pug-lint\n\nAn unopinionated and configurable linter and style checker for Pug (formerly Jade)\n\n[![build status](https://img.shields.io/travis/pugjs/pug-lint/master.svg)](https://travis-ci.org/pugjs/pug-lint)\n[![coverage status](https://img.shields.io/codecov/c/github/pugjs/pug-lint/master.svg)](https://codecov.io/gh/pugjs/pug-lint)\n[![dependency status](https://img.shields.io/david/pugjs/pug-lint.svg)](https://david-dm.org/pugjs/pug-lint)\n[![npm](https://img.shields.io/npm/v/pug-lint.svg)](https://www.npmjs.com/package/pug-lint)\n\n## CLI\n\n### Installation\n\n```shell\n$ npm install -g pug-lint\n```\n\n### Usage\n\n```shell\n$ pug-lint [options] \u003cfile ...\u003e\n```\n\n#### Options\n\n* `-h, --help`: output usage information\n* `-V, --version`: output the version number\n* `-c, --config \u003cpath\u003e`: [configuration file](#configuration-file) path\n* `-r, --reporter \u003creporter\u003e`: error reporter; console - default, inline\n\n## Editor integration\n\n### Sublime Text 3\n\nIf you use SublimeLinter 3 with Sublime Text 3, you can install the\n[SublimeLinter-pug-lint](https://github.com/SublimeLinter/SublimeLinter-pug-lint)\nplugin using [Package Control](https://packagecontrol.io/).\n\n### Atom\n\nIf you use Atom, you can install the [linter-pug](https://atom.io/packages/linter-pug) package.\n\n### VS Code\n\nIf you use VS Code, you can install the [vscode-puglint](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-puglint) extension.\n\n### Vim\n\npug-lint is part of [syntastic](https://github.com/scrooloose/syntastic).\n\nIf you are using [vim-plug](https://github.com/junegunn/vim-plug) to manage your\nVim plugins (recommended), you can do:\n\n```\n\" In your ~/.vimrc\nPlug 'scrooloose/syntastic'\n\" Then run these commands\n:source %\n:PlugInstall\n```\n\nThen to turn the pug linter on, you will need this line in your `.vimrc`.\n\n```\nlet g:syntastic_pug_checkers = ['pug_lint']\n```\n\n## Build system integration\n\n### Gulp\n\nIf you're using Gulp as your build system, you can use [gulp-pug-linter](https://github.com/ilyakam/gulp-pug-linter) for easier integration.\n\n### Grunt\n\nIf you're using Grunt as your build system, you can use [grunt-puglint](https://github.com/mrmlnc/grunt-puglint) for easier integration.\n\n## Configuration file\n\nOptions 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`.\n\n### Options\n\n#### preset `deprecated`\n\nPresets have been deprecated in favour of [extending configuration files](#extends).\n\n\u003e 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\n\n#### extends\n\nType: `string`\n\nIf 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\n\nConfigurations can be extended by using:\n\n1. JSON file\n2. JS file\n3. [Shareable configuration package](#shareable-configuration-packages)\n\nThe extended configuration provides base rules, which can be overridden by the configuration that references it. For example:\n\n```json\n{\n  \"extends\": \"./node_modules/coding-standard/.pug-lintrc\",\n  \"disallowIdLiterals\": null\n}\n```\n\nYou can also extend configurations using [shareable configuration packages](#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:\n\n```shell\n$ npm install --save-dev pug-lint-config-clock\n```\n\n```json\n{\n  \"extends\": \"pug-lint-config-myrules\",\n  \"disallowIdLiterals\": null\n}\n```\n\nIn 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.\n\nYou can find config to extend on NPM using [`\"pug-lint-config\"` query](https://www.npmjs.com/search?q=pug-lint-config).\n\n\u003e **Note**: You can omit `pug-lint-config-` and pug-lint will automatically insert it for you\n\n#### excludeFiles\n\nType: `Array`\n\nDefault: `[\"node_modules/**\"]`\n\nDisables style checking for specified paths declared with glob patterns.\n\n#### additionalRules\n\nType: `Array`\n\nArray of file path matching patterns to load additional rules from, e.g.:\n\n```json\n{\n  \"additionalRules\": [\"project-rules/*.js\"]\n}\n```\n\n### Rules\n\n[List of available rules](docs/rules.md)\n\nYou can specifically disable any rule by omitting it from your `.pug-lintrc` config file or by assigning it to null, like so:\n\n```json\n{\n  \"disallowBlockExpansion\": null\n}\n```\n\nSome rules, if enabled at the same time, would be contradictory to one another, such as:\n\n```json\n{\n  \"disallowSpaceAfterCodeOperator\": true,\n  \"requireSpaceAfterCodeOperator\": true\n}\n```\n\nIn this case `requireSpaceAfterCodeOperator` is treated as null, and ignored.\n\n### Shareable configuration packages\n\nShareable configs are simply npm packages that export a configuration object. To start, [create a Node.js module](https://docs.npmjs.com/getting-started/creating-node-modules) 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:\n\n```js\nmodule.exports = {\n  disallowBlockExpansion: true\n};\n```\n\nOnce your shareable config is ready, you can [publish to npm](https://docs.npmjs.com/getting-started/publishing-npm-packages) to share with others. We recommend using the [`puglint`](https://www.npmjs.com/browse/keyword/puglint) and [`puglintconfig`](https://www.npmjs.com/browse/keyword/puglintconfig) keywords so others can easily find your module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpugjs%2Fpug-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpugjs%2Fpug-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpugjs%2Fpug-lint/lists"}