{"id":21925209,"url":"https://github.com/hex-ci/vscode-stylelint-plus","last_synced_at":"2026-02-24T19:01:35.632Z","repository":{"id":66439985,"uuid":"201640454","full_name":"hex-ci/vscode-stylelint-plus","owner":"hex-ci","description":"A VS Code extension to lint CSS/SCSS/Less with Stylelint. Zero-config with bundled v15, auto-fix on save, supports v14–v17, Vue, Svelte, and styled-components.","archived":false,"fork":false,"pushed_at":"2026-02-16T19:10:42.000Z","size":6100,"stargazers_count":34,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-17T01:49:53.851Z","etag":null,"topics":["autofix","code-quality","css","language-server-protocol","less","linter","postcss","scss","styled-components","stylelint","svelte","vscode","vscode-extension","vue"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=hex-ci.stylelint-plus","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/hex-ci.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-10T14:24:08.000Z","updated_at":"2026-02-16T19:10:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"81f47809-3d2c-408a-bb68-9c59f82775ed","html_url":"https://github.com/hex-ci/vscode-stylelint-plus","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/hex-ci/vscode-stylelint-plus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-ci%2Fvscode-stylelint-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-ci%2Fvscode-stylelint-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-ci%2Fvscode-stylelint-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-ci%2Fvscode-stylelint-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex-ci","download_url":"https://codeload.github.com/hex-ci/vscode-stylelint-plus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-ci%2Fvscode-stylelint-plus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29796735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T16:37:37.581Z","status":"ssl_error","status_checked_at":"2026-02-24T16:37:37.074Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["autofix","code-quality","css","language-server-protocol","less","linter","postcss","scss","styled-components","stylelint","svelte","vscode","vscode-extension","vue"],"created_at":"2024-11-28T21:17:34.820Z","updated_at":"2026-02-24T19:01:35.617Z","avatar_url":"https://github.com/hex-ci.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vscode-stylelint-plus\n\n[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/hex-ci.stylelint-plus)](https://marketplace.visualstudio.com/items?itemName=hex-ci.stylelint-plus)\n[![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/hex-ci.stylelint-plus)](https://marketplace.visualstudio.com/items?itemName=hex-ci.stylelint-plus)\n[![codecov](https://codecov.io/github/hex-ci/vscode-stylelint-plus/branch/main/graph/badge.svg?token=AiK4XitPgu)](https://codecov.io/github/hex-ci/vscode-stylelint-plus)\n\nEnglish | [简体中文](./README.zh-CN.md)\n\nA [Visual Studio Code](https://code.visualstudio.com/) extension to lint [CSS](https://www.w3.org/Style/CSS/)/[SCSS](https://sass-lang.com/documentation/syntax/)/[Less](http://lesscss.org/) with [Stylelint](https://stylelint.io/).\n\nShips with Stylelint v15 built-in — install the extension and start linting immediately, no extra setup required.\n\n## Quick Start\n\n1. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=hex-ci.stylelint-plus).\n2. Open any CSS, SCSS, or Less file — linting works out of the box using the bundled Stylelint v15.\n3. (Optional) Add a [Stylelint configuration file](https://stylelint.io/user-guide/configure/) to your project to customize rules.\n4. (Optional) To use your project's own Stylelint version (v14–v17), set `\"stylelint.useLocal\": true`.\n\n\u003e **Tip**: To avoid duplicate diagnostics from VS Code's built-in CSS/SCSS/Less validators, disable them:\n\u003e ```json\n\u003e \"css.validate\": false,\n\u003e \"less.validate\": false,\n\u003e \"scss.validate\": false\n\u003e ```\n\n## Features\n\n### Zero-Config Linting\n\nThe extension bundles Stylelint v15.11.0, so it works immediately after installation — no need to install Stylelint separately or create a config file. Without a config file, the extension still performs CSS syntax validation to catch basic syntax errors.\n\n### Auto-Fix on Save\n\nEnable `stylelint.autoFixOnSave` to automatically fix all auto-fixable problems whenever you save a file. This uses the native `onWillSaveWaitUntil` mechanism, so fixes are applied before the file is written to disk — no need to configure `editor.codeActionsOnSave`.\n\n```json\n{\n  \"stylelint.autoFixOnSave\": true\n}\n```\n\n### Quick Fix (Code Actions)\n\nHover over any Stylelint diagnostic and click the light bulb icon, or press `Ctrl+.` (`Cmd+.` on Mac):\n\n- **Fix: \\\u003cissue\\\u003e** — Fix the specific auto-fixable problem at the cursor (available only for rules that support auto-fix)\n- **Disable \\\u003crule\\\u003e for this line** — Insert a `/* stylelint-disable-next-line */` or `/* stylelint-disable-line */` comment to suppress the diagnostic\n\nYou can also fix all auto-fixable problems at once using the `Stylelint: Fix all auto-fixable problems` command from the Command Palette.\n\n### Validation Trigger Modes\n\nControl when linting runs via the `stylelint.run` setting:\n\n| Mode | Behavior |\n|------|----------|\n| `\"onType\"` (default) | Validates as you type, with a 150ms debounce |\n| `\"onSave\"` | Validates only when the file is saved |\n| `\"manual\"` | Validates only when you run `Stylelint: Validate current file` |\n\n### Workspace Linting\n\nLint all style files across the entire workspace at once:\n\n1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)\n2. Run `Stylelint: Lint entire workspace`\n\nScans files with these extensions: `.css`, `.scss`, `.less`, `.sass`, `.sss`, `.vue`, `.svelte`, `.html`, `.xml`, `.xsl`, `.md`, `.markdown`.\n\nAutomatically skips `node_modules`, `.git`, `dist`, `build`, `coverage`, `.next`, `.nuxt` directories. Files larger than 5MB are skipped.\n\n### Language Status Indicator\n\nThe extension shows a [Language Status](https://code.visualstudio.com/api/references/vscode-api#LanguageStatusItem) item next to the language indicator in the status bar. Click the language name (e.g., \"CSS\", \"SCSS\") to see it:\n\n- `Stylelint+ — bundled v15.11.0` — Using the extension's bundled version\n- `Stylelint+ — local v17.0.0` — Using your project's local version\n- `Stylelint+ — ⚠ Local not found, using bundled v15.11.0` — Local Stylelint not found, fell back to bundled\n- `Stylelint+ — Ready` — Shown before the first validation completes\n\n### Stylelint Version Support\n\nThe extension supports Stylelint v14, v15, v16, and v17 with automatic version detection.\n\n**Bundled version (default)**:\n- Stylelint v15.11.0 (CommonJS), works with Node.js \u003e= 18.0.0\n- Used when `stylelint.useLocal` is `false` (default)\n\n**Local version (user-installed)**:\n- Set `\"stylelint.useLocal\": true` to use your project's Stylelint\n- v14–v16 are loaded via CommonJS; v17+ is loaded via ESM (dynamic `import()`)\n- If local Stylelint is not found, the extension falls back to the bundled version and shows a warning\n\n#### Migrating to Stylelint v17\n\nStylelint v17 requires Node.js \u003e= 20.19.0 and uses ESM exclusively.\n\n1. Upgrade Node.js:\n   ```bash\n   nvm install 20\n   nvm use 20\n   ```\n\n2. Install Stylelint v17 locally:\n   ```bash\n   npm install stylelint@^17 --save-dev\n   ```\n\n3. Enable local version:\n   ```json\n   {\n     \"stylelint.useLocal\": true\n   }\n   ```\n\n4. Reload VS Code\n\n## Supported Languages\n\nThe extension activates for the following 21 [language identifiers](https://code.visualstudio.com/docs/languages/overview#_language-id):\n\n- CSS (`css`)\n- HTML (`html`)\n- JavaScript (`javascript`)\n- JavaScript React (`javascriptreact`)\n- Less (`less`)\n- Markdown (`markdown`)\n- Markdown+MathML (`source.markdown.math`)\n- PostCSS (`postcss`)\n- Sass (`sass`)\n- SCSS (`scss`)\n- styled-components\n  - Official (`source.css.styled`)\n  - Userland (`styled-css`)\n- Sugarss (`sugarss`)\n- Svelte (`svelte`)\n- TypeScript (`typescript`)\n- TypeScript React (`typescriptreact`)\n- Vue (`vue`, `vue-html`, `vue-postcss`)\n- XML (`xml`)\n- XSL (`xsl`)\n\n## Commands\n\nAll commands are available from the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`):\n\n| Command | Description |\n|---------|-------------|\n| `Stylelint: Fix all auto-fixable problems` | Fix all auto-fixable issues in the current file |\n| `Stylelint: Validate current file` | Manually trigger validation (useful in `manual` mode) |\n| `Stylelint: Lint entire workspace` | Lint all style files in the workspace |\n| `Stylelint: Retry local search` | Re-scan for local Stylelint installation (clears cache) |\n| `Stylelint: Show output channel` | Open the Stylelint+ output panel for debugging |\n\n## Settings\n\nAll settings are under the `stylelint.` prefix. Though it's recommended to use a [Stylelint configuration file](https://stylelint.io/user-guide/configure/) in your workspace, the following VS Code [settings](https://code.visualstudio.com/docs/configure/settings) are also available.\n\n### stylelint.enable\n\nType: `boolean` · Default: `true`\n\nControl whether this extension is enabled or not.\n\n### stylelint.autoFixOnSave\n\nType: `boolean` · Default: `false`\n\nAutomatically fix all auto-fixable Stylelint issues when saving a file. Fixes are applied before the file is written to disk via `onWillSaveWaitUntil`.\n\n### stylelint.run\n\nType: `\"onType\"` | `\"onSave\"` | `\"manual\"` · Default: `\"onType\"`\n\nControls when Stylelint validation is triggered. See [Validation Trigger Modes](#validation-trigger-modes) for details.\n\n### stylelint.useLocal\n\nType: `boolean` · Default: `false`\n\nUse the locally installed version of Stylelint from your project's `node_modules` instead of the bundled version. The extension searches upward from the current file's directory for `node_modules/stylelint`. If not found, it falls back to the bundled version.\n\n### stylelint.config\n\nType: `Object` · Default: `null`\n\nSet the Stylelint [`config`](https://stylelint.io/user-guide/node-api/#config) option. When this is set, Stylelint will not load configuration files (`.stylelintrc`, `stylelint.config.js`, etc.).\n\n```json\n{\n  \"stylelint.config\": {\n    \"rules\": {\n      \"color-no-invalid-hex\": true,\n      \"block-no-empty\": true\n    }\n  }\n}\n```\n\n### stylelint.configFile\n\nType: `string` · Default: `\"\"`\n\nPath to a Stylelint configuration file. Relative paths are resolved from the workspace root. When set, this takes precedence over `stylelint.config`.\n\n```json\n{\n  \"stylelint.configFile\": \".config/stylelint.config.js\"\n}\n```\n\n### stylelint.ignorePath\n\nType: `string` · Default: `\"\"`\n\nPath to a `.stylelintignore` file. Relative paths are resolved from the workspace root. When empty, the extension auto-discovers `.stylelintignore` by walking up from the document's directory.\n\n### stylelint.ignoreNodeModules\n\nType: `boolean` · Default: `true`\n\nWhether to skip validation for files inside `node_modules` directories.\n\n### stylelint.disableErrorMessage\n\nType: `boolean` · Default: `true`\n\nWhether to suppress error message popups. When enabled, errors are logged to the output channel but don't show as VS Code notifications.\n\n### stylelint.rules.customizations\n\nType: `Array` · Default: `[]`\n\nOverride the severity of specific Stylelint rules in VS Code diagnostics, without modifying your Stylelint config. Use `\"off\"` to suppress a rule entirely.\n\nEach entry has:\n- `rule` — The Stylelint rule name\n- `severity` — One of `\"error\"`, `\"warning\"`, `\"information\"`, `\"hint\"`, or `\"off\"`\n\n```json\n{\n  \"stylelint.rules.customizations\": [\n    { \"rule\": \"color-named\", \"severity\": \"hint\" },\n    { \"rule\": \"block-no-empty\", \"severity\": \"off\" }\n  ]\n}\n```\n\n### stylelint.codeAction.disableRuleComment\n\nType: `Object` · Default: `{ \"location\": \"separateLine\" }`\n\nControls where the \"Disable rule\" code action inserts the `stylelint-disable` comment.\n\n- `\"separateLine\"` (default) — Inserts `/* stylelint-disable-next-line \u003crule\u003e */` on the line above\n- `\"sameLine\"` — Appends `/* stylelint-disable-line \u003crule\u003e */` at the end of the same line\n\n```json\n{\n  \"stylelint.codeAction.disableRuleComment\": {\n    \"location\": \"sameLine\"\n  }\n}\n```\n\n## Security Scan\n\nThe VSIX package for each release is scanned on [VirusTotal](https://www.virustotal.com/) to verify it is free of malware and other security threats.\n\n## License\n\n[MIT License](./LICENSE) © 2019 – 2026 Hex\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex-ci%2Fvscode-stylelint-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex-ci%2Fvscode-stylelint-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex-ci%2Fvscode-stylelint-plus/lists"}