[英]ESLint + Airbnb without eslint-plugin-react
我正在尝试使用ESLint + Airbnb,并且收到错误消息:
无法加载插件反应:找不到模块“ eslint-plugin-react”
但是我没有使用eslint-plugin-react
参见我的.eslintrc.js
module.exports = {
extends: 'airbnb-base',
rules: {
'no-console': 0,
'linebreak-style': [2, 'windows'],
'no-new': 0,
'eslint eol-last': ['error', 'never'],
},
};
但不幸的是,我收到前面提到的错误消息。 我不知道这个错误。 我没有使用eslint-plugin-react
。 告诉我为什么需要此插件
根据他们在git上的线程,在您的配置中添加{ "extends": "airbnb/base" }
。
编辑:不建议使用以上内容。 相同的线程建议使用此软件包: https : //www.npmjs.com/package/eslint-config-airbnb-base
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.