{"_id":"@cjlumi/eslint-config","_rev":"3-c8b462d5d572f1cc538bcefa2db0827f","name":"@cjlumi/eslint-config","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.2":{"name":"@cjlumi/eslint-config","version":"0.0.2","description":"eslint规范","main":"index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"keywords":[],"author":{"name":"cjl"},"license":"ISC","devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","eslint":"^8.51.0","eslint-config-egg":"^13.0.0","eslint-config-prettier":"^9.0.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.28.1","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-jsx-plus":"^0.1.0","eslint-plugin-prettier":"^5.0.1","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-vue":"^9.17.0","lodash":"^4.17.21","mocha":"^10.2.0","typescript":"^5.2.2","vue-eslint-parser":"^9.3.2"},"scripts":{"clean":"rimraf node_modules","lint":"eslint ./","print-config":"eslint --print-config ./index.js > ./print-config.json"},"_id":"@cjlumi/eslint-config@0.0.2","_integrity":"sha512-PYREEQR34lQrnWw4MFbeqdpDoOTYjc17aTYxz5H10BWfT84A6rvxEwFOdNGs9vcG/kc69oBp5huceFoTCYUcMg==","_resolved":"C:\\Users\\mi\\AppData\\Local\\Temp\\f17542cf415ca2491e1ffe1350978159\\cjlumi-eslint-config-0.0.2.tgz","_from":"file:cjlumi-eslint-config-0.0.2.tgz","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-PYREEQR34lQrnWw4MFbeqdpDoOTYjc17aTYxz5H10BWfT84A6rvxEwFOdNGs9vcG/kc69oBp5huceFoTCYUcMg==","shasum":"4dd9b061cd6fa7d354e0b991abf75f3898dab5c2","tarball":"https://registry.npmjs.org/@cjlumi/eslint-config/-/eslint-config-0.0.2.tgz","fileCount":41,"unpackedSize":101321,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPNXAgvQegdJ8fFOh1TcXo8IUl5yQikwkxBTWDAdaVQgIgBUYwDaA7tfgJVT6jvhHHI8crsYgDFdYQ3hzAVjCs5fo="}]},"_npmUser":{"name":"cjlog","email":"1594684234@qq.com"},"directories":{},"maintainers":[{"name":"cjlog","email":"1594684234@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_0.0.2_1697379595419_0.9313368365350998"},"_hasShrinkwrap":false},"0.0.3":{"name":"@cjlumi/eslint-config","version":"0.0.3","description":"eslint规范","main":"index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"keywords":["cjlumi","javaScript","typescript","node","lint"],"author":{"name":"cjl"},"license":"ISC","devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","eslint":"^8.51.0","eslint-config-egg":"^13.0.0","eslint-config-prettier":"^9.0.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.28.1","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-jsx-plus":"^0.1.0","eslint-plugin-prettier":"^5.0.1","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-vue":"^9.17.0","lodash":"^4.17.21","mocha":"^10.2.0","typescript":"^5.2.2","vue-eslint-parser":"^9.3.2"},"scripts":{"clean":"rimraf node_modules","lint":"eslint ./","print-config":"eslint --print-config ./index.js > ./print-config.json"},"_id":"@cjlumi/eslint-config@0.0.3","_integrity":"sha512-rvZR6m1XKCvPVupfYpFr6BzUIi/KqLy9C2HhTgLEHhyqMG04V2a2I6Ttg0AlakxuSSswJ2BGMRAuBXm9ktSAxw==","_resolved":"C:\\Users\\mi\\AppData\\Local\\Temp\\9df40c67943e6b08774c1911755a9a03\\cjlumi-eslint-config-0.0.3.tgz","_from":"file:cjlumi-eslint-config-0.0.3.tgz","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-rvZR6m1XKCvPVupfYpFr6BzUIi/KqLy9C2HhTgLEHhyqMG04V2a2I6Ttg0AlakxuSSswJ2BGMRAuBXm9ktSAxw==","shasum":"db1f2158e51fcda043ca0e2baa4385026a8def8f","tarball":"https://registry.npmjs.org/@cjlumi/eslint-config/-/eslint-config-0.0.3.tgz","fileCount":41,"unpackedSize":100905,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDA0Nid6K0tHoWQMIq8jvo8ECXTH15VBCo03UHMWU1T/AiAWjIyBRI4Clr1S9hOJ+oVlW7FksBT/Or7J7P3pMehgGA=="}]},"_npmUser":{"name":"cjlog","email":"1594684234@qq.com"},"directories":{},"maintainers":[{"name":"cjlog","email":"1594684234@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_0.0.3_1697380970058_0.8029182268988673"},"_hasShrinkwrap":false},"0.0.5":{"name":"@cjlumi/eslint-config","version":"0.0.5","description":"eslint规范","main":"index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"keywords":["cjlumi","javaScript","typescript","node","lint"],"author":{"name":"cjl"},"license":"ISC","devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","eslint":"^8.51.0","eslint-config-egg":"^13.0.0","eslint-config-prettier":"^9.0.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.28.1","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-jsx-plus":"^0.1.0","eslint-plugin-prettier":"^5.0.1","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-vue":"^9.17.0","lodash":"^4.17.21","mocha":"^10.2.0","typescript":"^5.2.2","vue-eslint-parser":"^9.3.2"},"scripts":{"clean":"rimraf node_modules","lint":"eslint ./","print-config":"eslint --print-config ./index.js > ./print-config.json"},"_id":"@cjlumi/eslint-config@0.0.5","_integrity":"sha512-bcz+ASL+XCI6r6Arpb49LcX0zAcY5pI7IDltTeXir/gNveSEPhLx6OE+/v0exPGwmc3cbzcbOeBH76EDf23plw==","_resolved":"C:\\Users\\mi\\AppData\\Local\\Temp\\4f743fe95234038eeae1c0359f3843b0\\cjlumi-eslint-config-0.0.5.tgz","_from":"file:cjlumi-eslint-config-0.0.5.tgz","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-bcz+ASL+XCI6r6Arpb49LcX0zAcY5pI7IDltTeXir/gNveSEPhLx6OE+/v0exPGwmc3cbzcbOeBH76EDf23plw==","shasum":"f7160023e7d409bfd93570ff364a9d35ac4dd8e2","tarball":"https://registry.npmjs.org/@cjlumi/eslint-config/-/eslint-config-0.0.5.tgz","fileCount":41,"unpackedSize":100953,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpu4lbpmQC1LyP3GS3mo37VxyLuG+lX0xiP24y7ZhsMgIhAMQU4GvGKV1dHwmr6m/5Cgys50tlLNDAjD3y0PEcBQxk"}]},"_npmUser":{"name":"cjlog","email":"1594684234@qq.com"},"directories":{},"maintainers":[{"name":"cjlog","email":"1594684234@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_0.0.5_1697381701178_0.15266356133125747"},"_hasShrinkwrap":false},"1.0.0":{"name":"@cjlumi/eslint-config","version":"1.0.0","description":"eslint规范","main":"index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"keywords":["cjlumi","javaScript","typescript","node","lint"],"author":{"name":"cjl"},"license":"ISC","devDependencies":{"@babel/core":"^7.23.2","@babel/eslint-parser":"^7.22.15","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","eslint":"^8.51.0","eslint-config-egg":"^13.0.0","eslint-config-prettier":"^9.0.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.28.1","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-jsx-plus":"^0.1.0","eslint-plugin-prettier":"^5.0.1","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-vue":"^9.17.0","lodash":"^4.17.21","mocha":"^10.2.0","typescript":"^5.2.2","vue-eslint-parser":"^9.3.2"},"scripts":{"clean":"rimraf node_modules","lint":"eslint ./","print-config":"eslint --print-config ./index.js > ./print-config.json"},"_id":"@cjlumi/eslint-config@1.0.0","_integrity":"sha512-zPRefvFD0O67KcSB9ekXaaqK8cXH8AcXvSm2FQb5L+MBN/DAuATb1qRaAJIi9poh4Nm3Az/XURPLADUNApt1qw==","_resolved":"C:\\Users\\mi\\AppData\\Local\\Temp\\a7334edce66fe66f00169c5b3e98fa10\\cjlumi-eslint-config-1.0.0.tgz","_from":"file:cjlumi-eslint-config-1.0.0.tgz","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-zPRefvFD0O67KcSB9ekXaaqK8cXH8AcXvSm2FQb5L+MBN/DAuATb1qRaAJIi9poh4Nm3Az/XURPLADUNApt1qw==","shasum":"4f3a3b14c711fcd6a05e85d7e0f2cf2af0cc1740","tarball":"https://registry.npmjs.org/@cjlumi/eslint-config/-/eslint-config-1.0.0.tgz","fileCount":40,"unpackedSize":100179,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlnkAKXmk63JmCZZNlWSfkL9OZnWkN7OtU+pNOgyrtKQIgM2ZhxU05AGWmclAJEQv2MNWhLzrIvjHcBHcubRFnZRA="}]},"_npmUser":{"name":"cjlog","email":"1594684234@qq.com"},"directories":{},"maintainers":[{"name":"cjlog","email":"1594684234@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.0_1716087645609_0.5613704354325311"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-15T14:19:55.333Z","0.0.2":"2023-10-15T14:19:55.782Z","modified":"2024-05-19T03:00:46.077Z","0.0.3":"2023-10-15T14:42:50.340Z","0.0.5":"2023-10-15T14:55:01.424Z","1.0.0":"2024-05-19T03:00:45.835Z"},"maintainers":[{"name":"cjlog","email":"1594684234@qq.com"}],"description":"eslint规范","keywords":["cjlumi","javaScript","typescript","node","lint"],"author":{"name":"cjl"},"license":"ISC","readme":"---\norder: 1\ntoc: content\n---\n\n# @cjlumi/eslint-config\n\n介绍： 编码 eslint，有多个项目的模板，根据不同项目选择不同配置\n\n提供了多套配置文件以支持 `JavaScript`、`TypeScript`、`React`、等多种项目类型。\n\n## 1、JavaScript 项目\n\n针对未使用 `React` 的原生 `JavaScript` 项目，使用 `ESLint` 原生规则和 [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import) 规则，使用 [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser) 作为 `parser`，是本包的默认配置。\n\n### 依赖\n\n- [@babel/core](https://www.npmjs.com/package/@babel/core)\n- [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n\n### 安装\n\n```shell\nnpm i -D @cjlumi/eslint-config @babel/core @babel/eslint-parser eslint-plugin-import\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config\"]\n}\n```\n\n## 2、JavaScript + React 项目\n\n针对 JS React 项目，继承了默认配置，并启用了 [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) 和 [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks) 的规则。\n\n### 依赖\n\n- [@babel/core](https://www.npmjs.com/package/@babel/core)\n- [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react)\n- [eslint-plugin-react-hooks](https://www.npmjs.com/package/)\n\n### 安装\n\n```shell\nnpm i -D @cjlumi/eslint-config @babel/core @babel/eslint-parser eslint-plugin-import eslint-plugin-react eslint-plugin-react-hooks\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/react\"]\n}\n```\n\n<!-- ## 3、JavaScript + Vue 项目\n\n针对 `JS Vue` 的项目，继承了默认配置，并启用了 [eslint-plugin-vue](https://www.npmjs.com/package/eslint-plugin-vue) 插件的规则，使用 [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser) 作为 parser。\n\n### 依赖\n\n- [@babel/core](https://www.npmjs.com/package/@babel/core)\n- [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser)\n- [eslint-plugin-vue](https://www.npmjs.com/package/eslint-plugin-vue)\n\n### 安装\n\n```shell\nnpm i -D @cjlumi/eslint-config @babel/core @babel/eslint-parser eslint-plugin-import vue-eslint-parser eslint-plugin-vue\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/vue\"]\n}\n``` -->\n\n<!-- ## 4、JavaScript (Node.js) 项目\n\n针对 Node.js 项目，继承了默认配置和 [eslint-config-egg 的规则](https://github.com/eggjs/eslint-config-egg/blob/master/lib/rules/node.js)，规则由 ESLint 原生规则和 [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) 提供。\n\n### 依赖\n\n- [@babel/core](https://www.npmjs.com/package/@babel/core)\n- [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-config-egg](https://www.npmjs.com/package/eslint-config-egg)\n\n### 安装\n\n```shell\nnpm i -D @cjlumi/eslint-config @babel/core @babel/eslint-parser eslint-plugin-import eslint-config-egg\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/node\"]\n}\n``` -->\n\n## 3、TypeScript 项目\n\n针对未使用 `React` 或 `Vue` 的 `TypeScript` 项目，继承了默认配置，并启用了 [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) 插件的规则，使用 [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) 作为 parser。\n\n### 依赖\n\n- [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser)\n- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-import-resolver-typescript](https://www.npmjs.com/package/eslint-import-resolver-typescript)\n\n### 安装\n\n```shell\nnpm i -D @cjlumi/eslint-config @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-import-resolver-typescript\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/typescript\"]\n}\n```\n\n需保证项目已安装 `typescript` 依赖，另外如果项目的 `TS` 配置文件不是 `./tsconfig.json`，则需要设置 `.eslintrc` 中的 [parserOptions.project](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#parseroptionsproject) 字段 ，例如：\n\n```json\n{\n  \"extends\": \"@cjlumi/eslint-config/typescript\",\n  \"parserOptions\": {\n    \"project\": \"./tsconfig.eslint.json\"\n  }\n}\n```\n\n## 4、TypeScript + React 项目\n\n针对 `TS React` 项目，继承了 `JS React` 的配置，并启用了 [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) 插件的规则，使用 [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) 作为 parser。\n\n### 依赖\n\n- [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser)\n- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-import-resolver-typescript](https://www.npmjs.com/package/eslint-import-resolver-typescript)\n- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react)\n- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)\n<!-- - [eslint-plugin-jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y)@^6.3.1（可选） -->\n\n### 安装\n\n```bash\nnpm i -D @cjlumi/eslint-config @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-import-resolver-typescript eslint-plugin-react eslint-plugin-react-hooks\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/typescript/react\"]\n}\n```\n\n<!-- 如果需要无障碍能力：\n\n```shell\nnpm i -D  eslint-plugin-jsx-a11y\n```\n\n```json\n{\n  \"extends\": [\n    \"@cjlumi/eslint-config/typescript/react\",\n    \"@cjlumi/eslint-config/jsx-a11y\"\n  ]\n}\n``` -->\n\n<!-- ## 7、TypeScript + Vue 项目\n\n针对 `TS Vue` 项目，继承了 `JS Vue` 的配置，并启用了 [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) 插件的规则，使用 [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) 作为 `parser`。\n\n### 依赖\n\n- [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser)\n- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-import-resolver-typescript](https://www.npmjs.com/package/eslint-import-resolver-typescript)\n- [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser)\n- [eslint-plugin-vue](https://www.npmjs.com/package/eslint-plugin-vue)\n\n### 安装\n\n```shell\nnpm i -D @cjlumi/eslint-config @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-import-resolver-typescript vue-eslint-parser eslint-plugin-vue\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/typescript/vue\"]\n}\n```\n\n## 8、TypeScript (Node.js) 项目\n\n针对未使用 `React` 和 `Vue` 的 `TypeScript(Node)` 项目，继承了 `JS Node.js` 配置，并启用了 [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) 插件的规则，使用 [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) 作为 parser。\n\n### 依赖\n\n- [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser)\n- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin)\n- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)\n- [eslint-import-resolver-typescript](https://www.npmjs.com/package/eslint-import-resolver-typescript)\n- [eslint-config-egg](https://www.npmjs.com/package/eslint-config-egg)\n\n### 安装\n\n```bash\nnpm i -D @cjlumi/eslint-config @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-import-resolver-typescript eslint-config-egg\n```\n\n### 配置\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/typescript/node\"]\n}\n``` -->\n\n## 5、配合 Prettier 使用\n\n如果你的项目使用 [Prettier](https://prettier.io/) 进行代码格式化，本包的一些规则可能会跟 Prettier 格式化结果有冲突，[例如这条规则](https://github.com/typescript-eslint/typescript-eslint/issues/372)。为了避免冲突，你需要手动安装 [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) 和 [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)：\n\n### 安装\n\n```sh\nnpm install --save-dev eslint-config-prettier eslint-plugin-prettier\n```\n\n### 配置\n\n并修改 `.eslintrc` 的 `extends` 配置，增加 `prettier`，如下（以 TS React 项目为例）：\n\n```json\n{\n  \"extends\": [\"@cjlumi/eslint-config/typescript/react\", \"prettier\"]\n}\n```\n\n了解更多请阅读 [Prettier - Integrating with Linters](https://prettier.io/docs/en/integrating-with-linters.html)。\n\n<!-- ## 10、将风格问题降级\n\n为了保证一致的编码风格，本包中大量风格相关的规则被设为了 `error` 级别，以引起开发者的足够重视。如果你觉得风格问题不足以是 `error` 级别（有些用户根据 ESLint error 进行流程卡点），本包还提供了一套名为 'essential' 的配置文件，这套配置将所有风格问题降级为 `warn` 级别，仅将必要问题报告为 `error`，引用方式为在相应配置的 `@cjlumi/eslint-config` 后面加上 `/essential`，如对 `JS React` 项目为 `@cjlumi/eslint-config/essential/react`、对 `TS Vue` 项目为 `@cjlumi/eslint-config/essential/typescript/vue` -->\n\n## 了解更多\n\n- 如果你对 ESLint 还不熟悉，可以阅读官网的 [Getting Started](https://eslint.org/docs/user-guide/getting-started) 快速入门。\n- 了解如何为 IDE 配置 ESLint，可以参考官网的 [Integrations](http://eslint.org/docs/user-guide/integrations)。\n- 了解如何在继承本包的基础上对项目 ESLint 进行个性化配置，可参考官网的 [Configuring ESLint](https://eslint.org/docs/user-guide/configuring)。下面简介下 ESLint 配置中的几个常用字段：\n  - `extends`: 继承一组规则集。`\"extends\": \"@cjlumi/eslint-config\",` 表示继承本包定义的规则配置。\n  - `rules`: 配置规则，这里定义的规则会覆盖 `extends` 的规则。如果觉得本包开启的某条规则过于严格，你可以暂时在这里将其关闭。\n  - `parser`: 设置 ESLint 的解析器。ESLint 使用 espree 作为默认的解析器，可以通过这个参数指定其他的解析器。比如指定为 [@babel/eslint-parser](https://npmjs.com/package/@babel/eslint-parser)，以解析 Babel 支持但 ESLint 默认解析器不支持的语法（本包不同配置文件使用的解析器可在简介表格中的「依赖 parser」一列查看）。\n  - `globals`: 指定代码中可能用到的全局变量，以免全局变量被 [no-undef](http://eslint.org/docs/rules/no-undef) 规则报错。\n  - `env`: 指定代码的运行环境，每个环境预定义了一组对应的全局变量，本包已开启的环境有 browser、node、jquery、es6 及几个测试框架的环境。\n- 了解常用的 ESLint 命令，如 `--fix`、`--ext`，可参考官网的 [Command Line Interface](http://eslint.org/docs/user-guide/command-line-interface)。\n","readmeFilename":"README.md"}