{"id":31970658,"url":"https://github.com/winjs-dev/stylelint-config-win","last_synced_at":"2025-10-14T19:18:01.403Z","repository":{"id":57682824,"uuid":"273938978","full_name":"winjs-dev/stylelint-config-win","owner":"winjs-dev","description":"Stylelint 配置","archived":false,"fork":false,"pushed_at":"2025-05-27T05:28:57.000Z","size":114,"stargazers_count":0,"open_issues_count":31,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T17:25:37.569Z","etag":null,"topics":["linter","stylelint","stylelint-config"],"latest_commit_sha":null,"homepage":"","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/winjs-dev.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}},"created_at":"2020-06-21T16:07:01.000Z","updated_at":"2025-05-27T05:29:00.000Z","dependencies_parsed_at":"2022-09-21T13:38:33.860Z","dependency_job_id":null,"html_url":"https://github.com/winjs-dev/stylelint-config-win","commit_stats":null,"previous_names":["winjs-dev/stylelint-config-win","cloud-templates/stylelint-config-win"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/winjs-dev/stylelint-config-win","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fstylelint-config-win","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fstylelint-config-win/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fstylelint-config-win/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fstylelint-config-win/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winjs-dev","download_url":"https://codeload.github.com/winjs-dev/stylelint-config-win/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fstylelint-config-win/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014285,"owners_count":26085492,"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-10-13T02:00:06.723Z","response_time":61,"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":["linter","stylelint","stylelint-config"],"created_at":"2025-10-14T19:17:59.721Z","updated_at":"2025-10-14T19:18:01.389Z","avatar_url":"https://github.com/winjs-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stylelint-config-win\n\n团队内部的 stylelint 配置，支持 CommonJS 和 ESM 双模块系统。\n\n## 特性\n\n- ✅ 支持 CommonJS 和 ESM 双模块系统\n- ✅ 向前兼容，无需修改现有配置\n- ✅ 完整的 CSS/SCSS/Less 规则集\n- ✅ 支持 Vue 3 深度选择器\n- ✅ 现代化的构建配置\n\n## 安装\n\n```shell\nyarn add @winner-fed/stylelint-config-win -D\n```\n\n## 依赖版本\n\n```bash\nstylelint ^13.6.1\n```\n\n*Tips*：如果项目中没有安装此依赖包或者版本不一致，请安装或者升级。\n\n## 使用\n\n### CommonJS 方式 (传统方式，向前兼容)\n\n在你的项目的根目录下创建一个 `stylelint.config.js` 文件：\n\n```javascript\nmodule.exports = {\n  extends: \"@winner-fed/stylelint-config-win\"\n}\n```\n\n### ESM 方式 (现代方式)\n\n在你的项目的根目录下创建一个 `stylelint.config.mjs` 文件：\n\n```javascript\nexport default {\n  extends: \"@winner-fed/stylelint-config-win\"\n}\n```\n\n### 在 package.json 中配置\n\n```json\n{\n  \"stylelint\": {\n    \"extends\": \"@winner-fed/stylelint-config-win\"\n  }\n}\n```\n\n### 项目脚本配置\n\n在项目目录下的 `package.json` 添加检测指令：\n\n```diff\n{\n ...\n \"scripts\": {\n+    \"lint:style\": \"stylelint \\\"src/**/*.{vue,less,postcss,css,scss}\\\" --fix --cache --cache-location node_modules/.cache/stylelint/\",\n }\n ...\n}\n```\n\n## 模块导入方式\n\n### CommonJS 导入\n\n```javascript\n// 主入口 (推荐，向前兼容)\nconst config = require('@winner-fed/stylelint-config-win');\n\n// 明确的 CommonJS 入口\nconst config = require('@winner-fed/stylelint-config-win/index.cjs');\n```\n\n### ESM 导入\n\n```javascript\n// ESM 入口\nimport config from '@winner-fed/stylelint-config-win/index.mjs';\n\n// 或者使用动态导入\nconst config = await import('@winner-fed/stylelint-config-win/index.mjs');\n```\n\n## 支持的文件类型\n\n- `.css`\n- `.scss`\n- `.less`\n- `.vue` (单文件组件中的 `\u003cstyle\u003e` 块)\n- `.postcss`\n\n## 引用\n\n- [https://stylelint.io/](https://stylelint.io/)\n- [http://stylelint.cn/user-guide/rules/](http://stylelint.cn/user-guide/rules/)\n- [stylelint-config-moresec](https://github.com/MoresecFE/stylelint-config-moresec)\n- [css-order](https://github.com/cklwblove/note-css-order)\n\n## 环境要求\n\n\u003e Node.js \u003e= 12\n\n\u003e stylelint \u003e= 13.5.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinjs-dev%2Fstylelint-config-win","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinjs-dev%2Fstylelint-config-win","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinjs-dev%2Fstylelint-config-win/lists"}