@acolorbright/eslint-config-acb 中文文档教程
eslint-config-acb
此插件提供 ACB 的 .eslintrc
作为可扩展的共享配置,基于 Airbnb 的 eslint-config-airbnb。
Installation
该插件需要 eslint
、babel-eslint
和以下其他包:
eslint-plugin-extra-rules
eslint-plugin-import
eslint-plugin-jsx-a11y
eslint-plugin-jsx-control-statements
eslint-plugin-react
eslint-plugin-react-hooks
如果您不需要 React,请参阅 eslint-config-acb-base。 对于 React with TypeScript,请参阅 eslint-config-acb -反应打字稿。
$ npx install-peerdeps -D @acolorbright/eslint-config-acb && npm install -DE @acolorbright/eslint-config-acb@latest
然后将 "extends": "acb"
添加到您的 .eslintrc
文件中。
由于 install-peerdeps
没有标记来固定已安装对等依赖项的确切版本,因此建议手动将已安装的版本固定在 package.json
中。
eslint-config-acb
This plugin provides ACB's .eslintrc
as an extensible shared config, based on Airbnb's eslint-config-airbnb.
Installation
The plugin requires eslint
, babel-eslint
, and the following other packages:
eslint-plugin-extra-rules
eslint-plugin-import
eslint-plugin-jsx-a11y
eslint-plugin-jsx-control-statements
eslint-plugin-react
eslint-plugin-react-hooks
If you don't need React, see eslint-config-acb-base. For React with TypeScript see eslint-config-acb-react-typescript.
$ npx install-peerdeps -D @acolorbright/eslint-config-acb && npm install -DE @acolorbright/eslint-config-acb@latest
Then add "extends": "acb"
to your .eslintrc
file.
Since install-peerdeps
doesn't have a flag to pin the exact version of the installed peer dependencies it's advisable to pin the installed versions in package.json
by hand.