简体   繁体   中英

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. The problem I have is I need to install eslint-config-airbnb dependency which depends on eslint-plugin-jsx-a11y and some react plugin. My project is not a react project and I wonder how I can use airbnb eslint without bring react dependencies.

Below is the configuration in my eslint to use airbnb style:

extends: [airbnb, eslint:recommended]

Airbnb附带了一个单独的软件包eslint-config-airbnb-baseeslint-config-airbnb继承自该eslint-config-airbnb ),其中仅包含不支持React / JSX的基本样式。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM