{"_id":"@abcd-npm/eslint-config","name":"@abcd-npm/eslint-config","dist-tags":{"latest":"2.0.4"},"versions":{"2.0.4":{"name":"@abcd-npm/eslint-config","description":"eslint config for typescript&react","license":"MIT","version":"2.0.4","main":"index.js","dependencies":{"@babel/eslint-parser":"^7.24.1","@abcd-npm/script-tools":"","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-babel":"^5.3.1","eslint-plugin-import":"2.29.1","eslint-plugin-jsdoc":"^46.4.4","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-prettier":"^5.1.3","eslint-plugin-react":"^7.33.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-tsdoc":"^0.2.17","eslint-plugin-vue":"^9.15.1","figlet":"^1.6.0","prettier":"^3.2.5","vue-eslint-parser":"^9.4.2"},"devDependencies":{"react":"^18.2.0","shelljs":"^0.8.5","typescript":"5.1.6"},"keywords":["config","es2015","es2016","es2017","es2018","eslint","eslintconfig","javascript","styleguide","typescript"],"packageInfo":{"repoPath":"packages/eslint-config"},"publishConfig":{"access":"public","directory":"./"},"scripts":{"test":"npm run checkCode:all","checkCode":"npm run checkCode:all","checkCode:all":"npm run checkCode:index && npm run checkCode:base && npm run checkCode:react && npm run checkCode:vue && npm run checkCode:typescript","checkCode:index":"eslint -c ./test/.eslintrc.index.js \"./test/index.ts\"","checkCode:base":"eslint -c ./test/.eslintrc.base.js \"./test/base.js\"","checkCode:react":"npx eslint -c ./test/.eslintrc.react.js \"./test/react.jsx\"","checkCode:vue":"eslint -c ./test/.eslintrc.vue.js \"./test/vue.vue\"","checkCode:typescript":"eslint -c ./test/.eslintrc.ts.js \"./test/typescript.ts\""},"_id":"@abcd-npm/eslint-config@2.0.4","_integrity":"sha512-OinRI22n+ln+GvkpGNGOZkU4uUrYY6LGDrAOacqmfV6QDt9kFJBRUephGmNmoqDaYkuE2yvkSEKDqD7Kt/9leA==","_resolved":"/private/var/folders/6b/gr1y86bn4bg9qk22wxz8sn980000gn/T/6081da0dbc06f33833001c888e7c292a/abcd-npm-eslint-config-2.0.4.tgz","_from":"file:abcd-npm-eslint-config-2.0.4.tgz","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-OinRI22n+ln+GvkpGNGOZkU4uUrYY6LGDrAOacqmfV6QDt9kFJBRUephGmNmoqDaYkuE2yvkSEKDqD7Kt/9leA==","shasum":"36eecc3d445ab091cb6f62031978162163b1e01d","tarball":"https://registry.npmjs.org/@abcd-npm/eslint-config/-/eslint-config-2.0.4.tgz","fileCount":30,"unpackedSize":59712,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDzI+X0+vtjcepbnXH/cefj73m6S0bxWNWDBCoI0S22jQIgK7wjFji8YTJWZ+ereOrt9VAdNKRQBJyjLnDRlHuNiI0="}]},"_npmUser":{"name":"abcd-npm","email":"593213753@qq.com"},"directories":{},"maintainers":[{"name":"abcd-npm","email":"593213753@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-config_2.0.4_1777387803628_0.16608912252449515"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T14:50:03.526Z","2.0.4":"2026-04-28T14:50:03.801Z","modified":"2026-04-28T14:50:04.005Z"},"maintainers":[{"name":"abcd-npm","email":"593213753@qq.com"}],"description":"eslint config for typescript&react","keywords":["config","es2015","es2016","es2017","es2018","eslint","eslintconfig","javascript","styleguide","typescript"],"license":"MIT","readme":"# @abcd-npm/eslint-config\n## 介绍\n\n无依赖第三方规则包，启用的所有规则都可以在.eslintrc.js 或 rules 文件夹下找到  \n启用的所有规则都有注释，所有规则的详细说明都在 docs 文件夹下，可通过规则名搜到对应规则的文件名\n\n## 安装\n\n```shell\npnpm i @abcd-npm/eslint-config --save-dev\n```\n\n## 注意\n\n不要在项目里手动指定 `eslint` 版本，正确的做法是使用 `@abcd-npm/eslint-config` 里的 `eslint` 版本。  \n如果 `eslint` 版本不一致，那么 `@abcd-npm/eslint-config` 有可能不会正常工作。\n\n## 使用\n\n将下面的代码保存至项目根目录，文件名为.eslintrc.js\n`默认用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config'],\n  rules: {},\n};\n```\n\n`仅使用javascript规则的用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/base'],\n  rules: {},\n};\n```\n\n`仅使用react规则的用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/react'],\n  rules: {},\n};\n```\n\n`仅使用prettier规则的用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/prettier'],\n  rules: {},\n};\n```\n\n`仅使用vue规则的用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/vue'],\n  rules: {},\n};\n```\n\n`仅使用typescript规则的用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/typescript'],\n  rules: {},\n};\n```\n\n`仅使用comment规则的用法`\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/comment'],\n  rules: {},\n};\n```\n\n建议直接使用`\"extends\": [\"@abcd-npm/eslint-config\"]`,不要使用`\"extends\": [\"@abcd-npm/eslint-config/base\", \"@abcd-npm/eslint-config/react\", \"@abcd-npm/eslint-config/typescript\"]`,因为@abcd-npm/eslint-config 还包含了 prettier 相关的规则\n\n### 使用 Prettier\n\n`eslint有可能会与prettier冲突，请参考此文档排查规则：https://github.com/prettier/eslint-config-prettier#curly`\n\n- vscode 下安装插件,\n\n- [WebStorm 的安装配置点这里](https://prettier.io/docs/en/webstorm.html)\n\n- 忽略 Prettier 规则，[参考这里](https://prettier.io/docs/en/ignore.html)\n\n- 安装 Prettier\n\n```bash\nnpm i prettier -D\n```\n\n- 使用\n\n```javascript\n\n// 在package.json 设置如下\n{\n  \"prettier\": \"@abcd-npm/eslint-configg/.prettierrc\"\n}\n\n// 或者 在 .prettierrc.js，如\nmodule.exports = {\n  ...require(\"@abcd-npm/eslint-config/.prettierrc\"),\n  semi: false,\n};\n\n```\n\n- [配置项文档](https://prettier.io/docs/en/options.html)\n\n## 非 typescript 非 React 项目的配置参考\n\n```js\nmodule.exports = {\n  extends: ['@abcd-npm/eslint-config/base', '@abcd-npm/eslint-config/prettier'],\n};\n```\n\n## 规则说明\n\n\"0\"表示忽略问题，等同于\"off\";\n\"1\"表示给出警告，等同于\"warn\";\n\"2\"表示直接报错，等同于\"error\"。\n\n`若不适用 React 请使用 base.js`\n\n## 官方地址\n\n`eslint官方地址`：<https://eslint.cn/docs/rules/>\n`eslint-plugin-react官方地址`：<https://github.com/yannickcr/eslint-plugin-react>\n`eslint-plugin-jsx-a11y官方地址`：<https://github.com/jsx-eslint/eslint-plugin-jsx-a11y>\n`eslint-plugin-react-hooks官方地址`：<https://github.com/facebook/react/tree/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/eslint-plugin-react-hooks>\n`eslint-plugin-import官方地址`：<https://github.com/benmosher/eslint-plugin-import>\n\n### 代码提交类型说明\n\n`type` :(required)代表提交类型；如修改一个 bug 或者是添加一个新的 feature。类型有以下几种：\n\n- feat :新功能（feature）\n- fix :修复 bug\n- docs :仅修改了文档，如 README、CHANGLOG 等\n- style :仅修改了空格、缩进、逗号、单双引号等，不修改代码逻辑\n- refactor :代码重构，没有新增功能或者修改 bug\n- perf :优化相关，比如提升性能、体验\n- test :测试用例，单元测试、集成测试\n- chore :改进构建流程或添加新依赖、工具等\n- revert :回滚代码到上一次提交\n","readmeFilename":"README.md","_rev":"1-962dc7bfa1b2c832e0e8fb78bd245bb0"}