{"id":20464956,"url":"https://github.com/stylus/stylelint-stylus","last_synced_at":"2025-08-11T23:17:48.412Z","repository":{"id":37050558,"uuid":"504091595","full_name":"stylus/stylelint-stylus","owner":"stylus","description":"Stylelint plugin for Stylus","archived":false,"fork":false,"pushed_at":"2024-03-31T15:30:45.000Z","size":597,"stargazers_count":27,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-03T02:17:01.636Z","etag":null,"topics":["stylelint","stylus"],"latest_commit_sha":null,"homepage":"https://stylus.github.io/stylelint-stylus/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stylus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ota-meshi","stylus"],"patreon":null,"open_collective":"stylus","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-06-16T09:23:43.000Z","updated_at":"2025-03-22T16:42:38.000Z","dependencies_parsed_at":"2024-06-18T21:33:51.495Z","dependency_job_id":"ebd3c2ba-f345-4976-b8c4-c4186ae93d13","html_url":"https://github.com/stylus/stylelint-stylus","commit_stats":{"total_commits":187,"total_committers":4,"mean_commits":46.75,"dds":"0.49732620320855614","last_synced_commit":"2efd5d634a31083c1b9c59de38ce7686c90c7e12"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/stylus/stylelint-stylus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylus%2Fstylelint-stylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylus%2Fstylelint-stylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylus%2Fstylelint-stylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylus%2Fstylelint-stylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stylus","download_url":"https://codeload.github.com/stylus/stylelint-stylus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylus%2Fstylelint-stylus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269826099,"owners_count":24481365,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["stylelint","stylus"],"created_at":"2024-11-15T13:16:55.155Z","updated_at":"2025-08-11T23:17:48.383Z","avatar_url":"https://github.com/stylus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ota-meshi","https://github.com/sponsors/stylus","https://opencollective.com/stylus"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003estylelint-stylus\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://stylelint.io/\" alt=\"Stylelint\"\u003eStylelint\u003c/a\u003e plugin for \u003ca href=\"https://stylus-lang.com/\" alt=\"Stylus\"\u003eStylus\u003c/a\u003e.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003e\u003ci\u003eThis plugin is still in an experimental state\u003c/i\u003e\u003c/b\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/stylelint-stylus\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/stylelint-stylus.svg\" alt=\"NPM license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/stylelint-stylus\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/stylelint-stylus.svg\" alt=\"NPM version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/stylelint-stylus\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dw/stylelint-stylus.svg\" alt=\"NPM downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/stylus/stylelint-stylus/actions?query=workflow%3ACI\"\u003e\n    \u003cimg src=\"https://github.com/stylus/stylelint-stylus/workflows/CI/badge.svg?branch=main\" alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n## :name_badge: Introduction\n\n[Stylelint] plugin for [Stylus].\n\nThis plugin allows us to check the [Stylus] with [Stylelint].\n\n- Finds the many wrong use of selector, declaration, at-rule and more using the rules of [Stylelint].\n- Finds the violations in coding style for [Stylus].\n- Use the [fix option] to automatically fixes the many stylistic violations.\n\n[fix option]: https://stylelint.io/user-guide/usage/options#fix\n\n[Stylelint editor integrations](https://stylelint.io/user-guide/integrations/editor) are useful to check your code in real-time.\n\nYou can check on the [Online DEMO](https://stylelint.io/demo/#N4Igxg9gJgpiBcID0SAEAVATgT1QZQBdsAbAVwGcBCAHQDsAjaXYO1VAMwloPlQEYALAAcAHkj4A6AKyoAEjGIA3GAQCWYAIYAaVBsyqNxHeQ21yAWnIx97ANytUAYmIQA5hFQtabNo0yxMc0wNKFUKXilRe29UAF86eNo6FFQAMWIYEVV6DNRybG4NETpGKGwHTm5+YTFJGXklFXVtXX1DY1MLKxs6B3pSAgIuPoGh2gl+weGY1VohAYBtIiEYAF5qEEmxjYBdB1n5giXsFfWQclJ6AFtVAl2HXwh-ayCQsPJUSOKk2hSAWVUWTMJSeAVeoQoAApFIYAJQOcwAdxg9AA1rdzH4wcEIeReDDiAirhAAF6Y0EvHHvfGGPoUwJU8KoAkOEqjLieOnPBlvKFfWHRRIgLQgdiqDIAOQ0VzgiEy0qEGQk5CIxGF4C4YtcCBAXjYG0yBBgtCg5A2vAWD1QGxVJAUswIllVFCQKtMUD0UA2Dj2tFi6sgtC1qSeVw0BB1ACtyFx1bAhOQdXrredVfbuOaU8RwzAVRstKzU3biA6nSQKJmNtmjXmQAkQLEgA).\n\n## :cd: Installation\n\nVia [npm]:\n\n```bash\nnpm install --save-dev stylelint stylelint-stylus\n```\n\n## :book: Usage\n\n`stylelint-stylus` is a plugin for [Stylelint], so it is for use with [Stylelint].  \nIf you are not using [Stylelint], start by using [Stylelint].\n\n### Configuration\n\nUse `.stylelintrc.*` or `stylelint.config.js` file to configure rules. See also: [https://stylelint.io/user-guide/configure](https://stylelint.io/user-guide/configure).\n\nExample **stylelint.config.js**:\n\n```js\nmodule.exports = {\n  extends: [\n    // add more generic rulesets here, such as:\n    // \"stylelint-config-standard\",\n    \"stylelint-stylus/standard\",\n  ],\n  rules: {\n    // override/add rules settings here, such as:\n    // \"stylus/declaration-colon\": \"never\"\n  },\n};\n```\n\nIf you want to set all the rules yourself, set as follows.\n\n```js\nmodule.exports = {\n  plugins: [\n    // add this plugin here:\n    \"stylelint-stylus\",\n  ],\n  // makes the stylus files parseable.\n  overrides: [\n    {\n      files: [\"*.stylus\", \"*.styl\", \"**/*.stylus\", \"**/*.styl\"],\n      customSyntax: \"postcss-styl\",\n    },\n  ],\n  rules: {\n    // add rules settings here, such as:\n    \"stylus/declaration-colon\": \"never\",\n    \"stylus/pythonic\": \"always\",\n    \"stylus/selector-list-comma\": \"never\",\n    \"stylus/semicolon\": \"never\",\n    \"stylus/single-line-comment\": \"always\",\n  },\n};\n```\n\n## :computer: Editor integrations\n\n### Visual Studio Code\n\nUse the [stylelint.vscode-stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) extension that [Stylelint] provides officially.\n\nYou have to configure the `stylelint.validate` option of the extension to check `.stylus` files, because the extension does not check the `*.stylus` file by default.\n\nExample **.vscode/settings.json**:\n\n```jsonc\n{\n  \"stylelint.validate\": [\n      ...,\n      // ↓ Add \"stylus\" language.\n      \"stylus\"\n  ]\n}\n```\n\n### Custom Syntax\n\n**If you are using stylelint v13, you need to do the following:**\n\nSet [custom syntax](https://stylelint.io/user-guide/usage/options#customsyntax) for parsing [Stylus]. With the following setting, `.styl` and `\u003cstyle lang=\"stylus\"\u003e` are parsed by [postcss-styl].\n\n- via CLI\n\n  ```bash\n  stylelint ... --custom-syntax stylelint-stylus/custom-syntax\n  ```\n\n- with [VSCode extension]\n\n  ```json\n  {\n    \"stylelint.customSyntax\": \"stylelint-stylus/custom-syntax\",\n    \"stylelint.validate\": [\n      ...,\n      // ↓ Add \"stylus\" language.\n      \"stylus\"\n    ]\n  }\n  ```\n\n## :arrow_heading_up: RuleSets\n\nThis plugin provides some rulesets. It can be used by specifying it in the [`extends` of the Stylelint configuration](https://stylelint.io/user-guide/configure#extends).\n\n- `\"stylelint-stylus/recommended\"` ... Turns Off rules that cannot be used with the Stylus within `stylelint` (WIP). And turns On rules that possible errors rules within `stylelint-stylus`.\n- `\"stylelint-stylus/standard\"` ... Above, plus rules to improve code readability.\n\n## :white_check_mark: Rules\n\nYou can use [the rules built into Stylelint](https://stylelint.io/user-guide/rules/list) and the rules provided by this plugin.\n\nThe `--fix` option on the [command line](https://stylelint.io/user-guide/usage/options#fix) automatically fixes problems reported by rules which have a wrench :wrench: below.\n\n\u003c!--RULES_TABLE_START--\u003e\n\n### Possible Errors Rules\n\nThese rules relate to possible syntax or logic errors in Stylus.\n\n|    | Rule ID | Description | RuleSet |\n|:---|:--------|:------------|:--------|\n|  | [stylus/at-rule-no-unknown](https://stylus.github.io/stylelint-stylus/rules/at-rule-no-unknown.html) | disallow unknown at-rules. | `/recommended` |\n|  | [stylus/property-no-unknown](https://stylus.github.io/stylelint-stylus/rules/property-no-unknown.html) | disallow unknown properties. | `/recommended` |\n|  | [stylus/selector-type-no-unknown](https://stylus.github.io/stylelint-stylus/rules/selector-type-no-unknown.html) | disallow unknown type selectors. | `/recommended` |\n|  | [stylus/single-line-comment-no-empty](https://stylus.github.io/stylelint-stylus/rules/single-line-comment-no-empty.html) | disallow empty single-line comments. | `/recommended` |\n\n### Standard Rules\n\nThese rules relate to style guidelines.\n\n|    | Rule ID | Description | RuleSet |\n|:---|:--------|:------------|:--------|\n| :wrench: | [stylus/at-extend-style](https://stylus.github.io/stylelint-stylus/rules/at-extend-style.html) | enforces `@extend` style. | `/standard` |\n| :wrench: | [stylus/at-rule-empty-line-before](https://stylus.github.io/stylelint-stylus/rules/at-rule-empty-line-before.html) | require or disallow an empty line before at-rules. | `/standard` |\n| :wrench: | [stylus/at-rule-name-space-after](https://stylus.github.io/stylelint-stylus/rules/at-rule-name-space-after.html) | require a single space after at-rule names. | `/standard` |\n| :wrench: | [stylus/block-closing-brace-empty-line-before](https://stylus.github.io/stylelint-stylus/rules/block-closing-brace-empty-line-before.html) | require or disallow an empty line before the closing brace of blocks. | `/standard` |\n| :wrench: | [stylus/block-closing-brace-newline-after](https://stylus.github.io/stylelint-stylus/rules/block-closing-brace-newline-after.html) | require a newline or disallow whitespace after the closing brace of blocks. | `/standard` |\n| :wrench: | [stylus/block-closing-brace-newline-before](https://stylus.github.io/stylelint-stylus/rules/block-closing-brace-newline-before.html) | require a newline or disallow whitespace before the closing brace of blocks. | `/standard` |\n|  | [stylus/block-closing-brace-space-after](https://stylus.github.io/stylelint-stylus/rules/block-closing-brace-space-after.html) | require a single space or disallow whitespace after the closing brace of blocks. |  |\n| :wrench: | [stylus/block-closing-brace-space-before](https://stylus.github.io/stylelint-stylus/rules/block-closing-brace-space-before.html) | require a single space or disallow whitespace before the closing brace of blocks. | `/standard` |\n| :wrench: | [stylus/block-opening-brace-newline-after](https://stylus.github.io/stylelint-stylus/rules/block-opening-brace-newline-after.html) | require a newline after the opening brace of blocks. | `/standard` |\n| :wrench: | [stylus/block-opening-brace-space-after](https://stylus.github.io/stylelint-stylus/rules/block-opening-brace-space-after.html) | require a single space or disallow whitespace after the opening brace of blocks. | `/standard` |\n| :wrench: | [stylus/block-opening-brace-space-before](https://stylus.github.io/stylelint-stylus/rules/block-opening-brace-space-before.html) | require a single space or disallow whitespace before the opening brace of blocks. | `/standard` |\n| :wrench: | [stylus/color-hex-case](https://stylus.github.io/stylelint-stylus/rules/color-hex-case.html) | enforce lowercase or uppercase for hex colors. | `/standard` |\n| :wrench: | [stylus/declaration-colon](https://stylus.github.io/stylelint-stylus/rules/declaration-colon.html) | require or disallow declaration colons. | `/standard` |\n| :wrench: | [stylus/hash-object-property-comma](https://stylus.github.io/stylelint-stylus/rules/hash-object-property-comma.html) | require or disallow commas in hash object properties. | `/standard` |\n| :wrench: | [stylus/indentation](https://stylus.github.io/stylelint-stylus/rules/indentation.html) | enforces indentation. | `/standard` |\n| :wrench: | [stylus/media-feature-colon](https://stylus.github.io/stylelint-stylus/rules/media-feature-colon.html) | require or disallow media feature colons. | `/standard` |\n| :wrench: | [stylus/no-at-require](https://stylus.github.io/stylelint-stylus/rules/no-at-require.html) | disallow `@require`, use `@import` instead. | `/standard` |\n| :wrench: | [stylus/no-eol-whitespace](https://stylus.github.io/stylelint-stylus/rules/no-eol-whitespace.html) | disallow end-of-line whitespace. | `/standard` |\n| :wrench: | [stylus/number-leading-zero](https://stylus.github.io/stylelint-stylus/rules/number-leading-zero.html) | require or disallow a leading zero for fractional numbers less than 1. | `/standard` |\n| :wrench: | [stylus/number-no-trailing-zeros](https://stylus.github.io/stylelint-stylus/rules/number-no-trailing-zeros.html) | disallow trailing zeros in numbers. | `/standard` |\n| :wrench: | [stylus/pythonic](https://stylus.github.io/stylelint-stylus/rules/pythonic.html) | enforces pythonic or brace style. | `/standard` |\n| :wrench: | [stylus/selector-list-comma-newline-after](https://stylus.github.io/stylelint-stylus/rules/selector-list-comma-newline-after.html) | require a newline or disallow whitespace after the commas of selector lists. | `/standard` |\n| :wrench: | [stylus/selector-list-comma-newline-before](https://stylus.github.io/stylelint-stylus/rules/selector-list-comma-newline-before.html) | require a newline or disallow whitespace before the commas of selector lists. |  |\n| :wrench: | [stylus/selector-list-comma-space-after](https://stylus.github.io/stylelint-stylus/rules/selector-list-comma-space-after.html) | require a single space or disallow whitespace after the commas of selector lists. |  |\n| :wrench: | [stylus/selector-list-comma-space-before](https://stylus.github.io/stylelint-stylus/rules/selector-list-comma-space-before.html) | require a single space or disallow whitespace before the commas of selector lists. | `/standard` |\n| :wrench: | [stylus/selector-list-comma](https://stylus.github.io/stylelint-stylus/rules/selector-list-comma.html) | require or disallow selector list comma. | `/standard` |\n| :wrench: | [stylus/selector-pseudo-class-case](https://stylus.github.io/stylelint-stylus/rules/selector-pseudo-class-case.html) | enforce lowercase or uppercase for pseudo-class selectors. | `/standard` |\n| :wrench: | [stylus/semicolon](https://stylus.github.io/stylelint-stylus/rules/semicolon.html) | require or disallow semicolon. | `/standard` |\n| :wrench: | [stylus/single-line-comment-double-slash-space-after](https://stylus.github.io/stylelint-stylus/rules/single-line-comment-double-slash-space-after.html) | require or disallow whitespace after the double-slash of single-line comments. | `/standard` |\n| :wrench: | [stylus/single-line-comment](https://stylus.github.io/stylelint-stylus/rules/single-line-comment.html) | enforces comment style where single-line comments are allowed. | `/standard` |\n\n\u003c!--RULES_TABLE_END--\u003e\n\n## License\n\nSee the [LICENSE](./LICENSE) file for license rights and limitations (MIT).\n\n[stylelint]: https://stylelint.io/\n[stylus]: https://stylus-lang.com/\n[vscode extension]: https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint\n[postcss-styl]: https://github.com/stylus/postcss-styl\n[npm]: https://www.npmjs.com/\n[npm license]: https://img.shields.io/npm/l/stylelint-stylus.svg\n[npm version]: https://img.shields.io/npm/v/stylelint-stylus.svg\n[npm downloads]: https://img.shields.io/npm/dw/stylelint-stylus.svg\n[build status]: https://github.com/stylus/stylelint-stylus/workflows/CI/badge.svg?branch=main\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstylus%2Fstylelint-stylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstylus%2Fstylelint-stylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstylus%2Fstylelint-stylus/lists"}