[英]How can I use `eslint-config-airbnb` in a non-react project?
I am using eslint
in my project and I'd like to use airbnb
style. 我在项目中使用
eslint
,但我想使用airbnb
样式。 The problem I have is I need to install eslint-config-airbnb
dependency which depends on eslint-plugin-jsx-a11y
and some react
plugin. 我的问题是我需要安装
eslint-config-airbnb
依赖项,该依赖项取决于eslint-plugin-jsx-a11y
和一些react
插件。 My project is not a react project and I wonder how I can use airbnb
eslint without bring react dependencies. 我的项目不是
airbnb
项目,我想知道如何在不带来airbnb
依赖的情况下使用airbnb
eslint。
Below is the configuration in my eslint
to use airbnb
style: 以下是我的
eslint
中使用airbnb
样式的配置:
extends: [airbnb, eslint:recommended]
Airbnb附带了一个单独的软件包eslint-config-airbnb-base
( eslint-config-airbnb
继承自该eslint-config-airbnb
),其中仅包含不支持React / JSX的基本样式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.