{"id":22012846,"url":"https://github.com/leedomjs/stylelint-config","last_synced_at":"2026-04-01T21:50:00.098Z","repository":{"id":233912739,"uuid":"787932457","full_name":"leedomjs/stylelint-config","owner":"leedomjs","description":"🎀「Stylelint配置预设」Leedom's Stylelint config presets","archived":false,"fork":false,"pushed_at":"2024-09-11T16:11:04.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T23:41:57.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/leedomjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-04-17T13:08:30.000Z","updated_at":"2024-09-11T16:11:07.000Z","dependencies_parsed_at":"2024-04-17T17:30:33.850Z","dependency_job_id":"9d15dba5-620b-4dc5-b2e7-b1874861ae22","html_url":"https://github.com/leedomjs/stylelint-config","commit_stats":null,"previous_names":["leedomjs/stylelint-config"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/leedomjs/stylelint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Fstylelint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Fstylelint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Fstylelint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Fstylelint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leedomjs","download_url":"https://codeload.github.com/leedomjs/stylelint-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Fstylelint-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"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":[],"created_at":"2024-11-30T03:14:42.900Z","updated_at":"2026-04-01T21:50:00.027Z","avatar_url":"https://github.com/leedomjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @leedomjs/stylelint-config\n\n[![npm](https://img.shields.io/npm/v/@leedomjs/stylelint-config?color=333\u0026label=)](https://www.npmjs.com/package/@leedomjs/stylelint-config)\n\n- css, sass, scss, Vue out-of-box\n- Single quotes\n- Also lint for acss, wxss (`css of mini-program`)\n- Auto fix for formatting\n- Only one-line of config\n\n## Usage\n\n### Install\n\n```bash\npnpm add -D stylelint @leedomjs/stylelint-config\n```\n\n### Config `.stylelintrc`\n\n```json\n{\n  \"extends\": \"@leedomjs/stylelint-config\"\n}\n````\n\n### Add scripts for `package.json`\n\nFor example:\n\n```json\n{\n  \"scripts\": {\n    \"lint:style\": \"stylelint **/*.{css,scss,sass,acss,wxss,vue}\",\n    \"lint:style-fix\": \"stylelint **/*.{css,scss,sass,acss,wxss,vue} --fix\"\n  }\n}\n```\n\n### VS Code support (auto fix)\n\nInstall [VS Code Stylelint extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint)\n\nAdd the following settings to your `settings.json`:\n\n```jsonc\n{\n  \"editor.formatOnSave\": false,\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.stylelint\": true,\n  },\n\n  // The following is optional.\n  // It's better to put under project setting `.vscode/settings.json`\n  // to avoid conflicts with working with different stylelint configs.\n  \"stylelint.validate\": [\n    \"css\",\n    \"sass\",\n    \"scss\",\n    \"acss\",\n    \"wxss\",\n    \"vue\",\n  ]\n}\n```\n\n### Lint and auto-fix before every commit\n\nIf you want to apply lint and auto-fix before every commit, you could do this:\n\n#### 1. [husky](https://github.com/typicode/husky) + [`lint-staged`](https://github.com/okonet/lint-staged)\n\n```bash\npnpm dlx husky-init \u0026\u0026 pnpm install -D husky lint-staged\n```\n\nand add the following to your `package.json`:\n\n```jsonc\n{\n  \"scripts\": {\n    // This script will be added automatically when husky is installed successfully.\n    \"prepare\": \"husky install\"\n  },\n  \"lint-staged\": {\n    \"**/*.{css,scss,sass,acss,wxss,vue}\": \"stylelint --fix\"\n  }\n}\n```\n\nthen add the following to your `pre-commit`:\n\n\u003e .husky/pre-commit\n\n```sh\n#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\n# remove the default script\n# npx test\n\n# add this script\nnpx lint-staged\n```\n\n#### 2. [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) + [`lint-staged`](https://github.com/okonet/lint-staged)\n\nIf your project is small-sized, and you need quickly set up hooks and forget about it, `simple-git-hook` will be a good choice.\n\n```bash\npnpm install -D simple-git-hooks lint-staged\n```\n\nand add the following to your `package.json`:\n\n```jsonc\n{\n  \"simple-git-hooks\": {\n    \"pre-commit\": \"npx lint-staged\"\n  },\n  \"lint-staged\": {\n    \"**/*.{css,scss,sass,acss,wxss,vue}\": \"stylelint --fix\"\n  }\n}\n```\n\nthen run the CLI script to update the git hooks with the commands from the config:\n\n```bash\n# [Optional] These 2 steps can be skipped for non-husky users\ngit config core.hooksPath .git/hooks/\nrm -rf .git/hooks\n\n# Update ./git/hooks\nnpx simple-git-hooks\n```\n\n## Tips\n\nYou can override the rules in your `.stylelintrc` file.\n\n  ```jsonc\n  {\n    \"extends\": \"@leedomjs/stylelint-config\",\n    \"rules\": {\n      // your rules...\n    }\n  }\n  ```\n\n## License\n[MIT](https://github.com/leedomjs/stylelint-config/blob/main/LICENSE) License © 2024-present [Leedom](https://github.com/leedom92)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleedomjs%2Fstylelint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleedomjs%2Fstylelint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleedomjs%2Fstylelint-config/lists"}