最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Use eslint-config-airbnb without react plugins - Stack Overflow

programmeradmin0浏览0评论

I want to use the airbnb's eslinter without installing any react plugins. Is that possible?

Basically, all I want is to use this: eslint-config-airbnb. But it seems that it es bundled with some react specific stuff, as it requires:

It requires eslint, eslint-plugin-import, eslint-plugin-react, and eslint-plugin-jsx-a11y.

If I don't separately install those other plugins, my Atom editor will plain:

Error: Failed to load plugin react: Cannot find module 'eslint-plugin-react' Referenced from: airbnb Referenced from: /../../.eslintrc

So how can I use the eslint-config-airbnb without those react plugins? (Since I won't be using react).

I want to use the airbnb's eslinter without installing any react plugins. Is that possible?

Basically, all I want is to use this: eslint-config-airbnb. But it seems that it es bundled with some react specific stuff, as it requires:

It requires eslint, eslint-plugin-import, eslint-plugin-react, and eslint-plugin-jsx-a11y.

If I don't separately install those other plugins, my Atom editor will plain:

Error: Failed to load plugin react: Cannot find module 'eslint-plugin-react' Referenced from: airbnb Referenced from: /../../.eslintrc

So how can I use the eslint-config-airbnb without those react plugins? (Since I won't be using react).

Share Improve this question edited May 14, 2021 at 21:18 TylerH 21.1k79 gold badges79 silver badges114 bronze badges asked Sep 14, 2016 at 13:50 Ville Miekk-ojaVille Miekk-oja 21.1k34 gold badges79 silver badges117 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

If you don't care for the react rules, your best bet would be to use eslint-config-airbnb-base instead.

发布评论

评论列表(0)

  1. 暂无评论