{"_id":"@colorless/eslint-config","name":"@colorless/eslint-config","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"@colorless/eslint-config","version":"0.0.0","license":"Mozilla Public License 2.0","author":{"name":"longshihui"},"main":"./lib/index.js","exports":{".":"./lib/index.js"},"publishConfig":{"access":"public"},"type":"module","engines":{"node":">=18.18.0"},"repository":{"type":"git","url":"git+https://github.com/longshihui/code-linter.git"},"bugs":{"url":"https://github.com/longshihui/code-linter/issues"},"homepage":"https://github.com/longshihui/code-linter","dependencies":{"@eslint/js":"^9.29.0","eslint-config-prettier":"^10.1.5","eslint-plugin-vue":"^10.2.0","typescript-eslint":"^8.35.0","vue-eslint-parser":"^10.1.4"},"peerDependencies":{"eslint":">= 9","typescript":"^5.0.0"},"devDependencies":{"@types/eslint":"^9.6.1","@types/eslint-config-prettier":"^6.11.3","eslint":"^9.29.0","typescript":"^5.8.3"},"description":"ESlint是代码质量检测的工具，它通过静态扫描的方式结合相对应的代码编写规范，让你在开发过程中发现其代码中出现的问题，避免将问题遗留至运行时。想要了解更多信息请移步[官网](https://prettier.io/)","_id":"@colorless/eslint-config@0.0.0","_integrity":"sha512-OLzgE0simopoGuCPiT2QbO4s2KCH0ImMYBYirvuOpB+w+ve5eZCGbcZaZTH7bOaYyhhUMcRt4hPPsLSHDCVVDA==","_resolved":"C:\\Users\\39142\\AppData\\Local\\Temp\\119dd40ad9a0555d7e0f64622ed7d4b9\\colorless-eslint-config-0.0.0.tgz","_from":"file:colorless-eslint-config-0.0.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"8.15.1","dist":{"integrity":"sha512-OLzgE0simopoGuCPiT2QbO4s2KCH0ImMYBYirvuOpB+w+ve5eZCGbcZaZTH7bOaYyhhUMcRt4hPPsLSHDCVVDA==","shasum":"84b558fc142b4e3f5576bc2be77910a5dad3910c","tarball":"https://registry.npmjs.org/@colorless/eslint-config/-/eslint-config-0.0.0.tgz","fileCount":4,"unpackedSize":21013,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICO2WLITX55+Mf6ZxgVH8RNjd2ljQZGLae4+wnw+DeTuAiEAhU0Brb/b1nGsg6vSTsycqtp73p+bqncaqwM+SzpnlWk="}]},"_npmUser":{"name":"colorless","email":"hackcolorless@gmail.com","actor":{"name":"colorless","email":"hackcolorless@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"colorless","email":"hackcolorless@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-config_0.0.0_1750926537232_0.4042766407053804"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-26T08:28:57.161Z","0.0.0":"2025-06-26T08:28:57.421Z","modified":"2025-06-26T08:28:57.675Z"},"maintainers":[{"name":"colorless","email":"hackcolorless@gmail.com"}],"description":"ESlint是代码质量检测的工具，它通过静态扫描的方式结合相对应的代码编写规范，让你在开发过程中发现其代码中出现的问题，避免将问题遗留至运行时。想要了解更多信息请移步[官网](https://prettier.io/)","homepage":"https://github.com/longshihui/code-linter","repository":{"type":"git","url":"git+https://github.com/longshihui/code-linter.git"},"author":{"name":"longshihui"},"bugs":{"url":"https://github.com/longshihui/code-linter/issues"},"license":"Mozilla Public License 2.0","readme":"# @colorless/eslint-config\r\n\r\nESlint是代码质量检测的工具，它通过静态扫描的方式结合相对应的代码编写规范，让你在开发过程中发现其代码中出现的问题，避免将问题遗留至运行时。想要了解更多信息请移步[官网](https://prettier.io/)\r\n\r\n本项目提供了开箱即用的团队内部的统一代码质量标准，项目中配合git hooks即可在每一次提交代码对其进行质量检测。\r\n\r\n## 规则列表\r\n\r\n| 规则                           | 说明                     | 详细的规则说明                                    |\r\n| ------------------------------ | ------------------------ | ------------------------------------------------- |\r\n| @typescript-eslint/recommended | typescript的业界最佳实践 | [详细规则](https://typescript-eslint.io/rules/)   |\r\n| eslint:recommended             | 业界javascript的最佳实践 | [详细规则](https://eslint.org/docs/latest/rules/) |\r\n| vue/vue3-recommended           | vue3官方最佳实践         | [详细规则](https://eslint.vuejs.org/rules/)       |\r\n\r\n## 如何使用\r\n\r\n**Step.1 安装规范包**\r\n\r\n```bash\r\npnpm add @colorless/eslint-config -D\r\n```\r\n\r\n**Step.2 在eslint的配置文件(..eslintrc.js)中进行配置**\r\n\r\n```js\r\nmodule.exports = {\r\n  root: true,\r\n  env: {\r\n    browser: true,\r\n    node: true\r\n  },\r\n  extends: '@colorless/eslint-config'\r\n}\r\n\r\n```\r\n\r\n## 配置说明\r\n\r\n本项目提供了两种eslint配置\r\n\r\n- vue环境\r\n- typescript环境\r\n\r\n### vue环境\r\n\r\n如果你的项目是一个运行在浏览器端的vue 3项目，则可以使用默认的配置导出，或者指定其配置文件：\r\n\r\n```js\r\nmodule.exports = {\r\n  root: true,\r\n  env: {\r\n    browser: true,\r\n    node: true\r\n  },\r\n  // 包的默认导出是vue3的规范\r\n  extends: '@colorless/eslint-config'\r\n}\r\n```\r\n\r\n### typescript环境\r\n\r\n如果你的项目是一个纯typescript项目，那么可能不需要其他不必要的lint，那么你可以使用`@colorless/eslint-config/typescript`这个规范，它将只包含在纯typescript下应该包含的规则\r\n\r\n```js\r\nmodule.exports = {\r\n  root: true,\r\n  env: {\r\n    browser: true,\r\n    node: true\r\n  },\r\n  // 包的默认导出是vue3的规范\r\n  extends: '@colorless/eslint-config/typescript'\r\n}\r\n```\r\n\r\n","readmeFilename":"README.md","_rev":"1-982990f2181c19ce2b10f4c62d361c57"}