gpt4 book ai didi

javascript - 如何正确安装 eslint-config-airbnb? `UNMET PEER DEPENDENCY`

转载 作者:数据小太阳 更新时间:2023-10-29 04:39:51 26 4
gpt4 key购买 nike

➜  beslint git:(master) ✗ eslint -v
v3.15.0
➜ beslint git:(master) ✗ npm install -g eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-import eslint-plugin-react

/Users/next/.nvm/versions/node/v7.5.0/lib
├── UNMET PEER DEPENDENCY eslint@^3.15.0
├─┬ eslint-config-airbnb@14.1.0
│ └── UNMET PEER DEPENDENCY eslint@^3.15.0
├── eslint-plugin-import@2.2.0
├── eslint-plugin-jsx-a11y@4.0.0
└── eslint-plugin-react@6.10.0

npm WARN eslint-config-airbnb@14.1.0 requires a peer of eslint@^3.15.0 but none was installed.
npm WARN eslint-config-airbnb-base@11.1.0 requires a peer of eslint@^3.15.0 but none was installed.
npm WARN eslint-plugin-import@2.2.0 requires a peer of eslint@2.x - 3.x but none was installed.
npm WARN eslint-plugin-jsx-a11y@4.0.0 requires a peer of eslint@^2.10.2 || 3.x but none was installed.
npm WARN eslint-plugin-react@6.10.0 requires a peer of eslint@^2.0.0 || ^3.0.0 but none was installed.
➜ beslint git:(master) ✗
  • 我厌倦了全局安装
  • 我使用 nvm 安装 node 7.5.0,并全局安装了 eslint。
  • 当我尝试全局安装 eslint-config-airbnb 时。
  • 上面写着未满足的同伴依赖

最佳答案

您可以安装 eslint-config-airbnb-bundle。这是一个未更改 Airbnb 风格指南配置,与 ESLint 捆绑在一个包中,以解决安装过程中的一些不便(例如未满足的对等依赖警告)。您也可以全局安装它:

npm i -g eslint-config-airbnb-bundle

仅限爱彼迎:https://www.npmjs.com/package/eslint-config-airbnb-bundle

Airbnb + 标准版:https://www.npmjs.com/package/eslint-config-airbnb-standard

关于javascript - 如何正确安装 eslint-config-airbnb? `UNMET PEER DEPENDENCY`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42288376/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com