我在使用配置后的配置运行的每个eslint上都会收到以下警告。它是由什么造成的?如何摆脱它?
eslint warnings
can't resolve reference #/definitions/basicConfig from id #
can't resolve reference #/definitions/basicConfigOrBoolean from id #
can't resolve reference #/definitions/basicConfigOrBoolean from id #
.eslintrc.js
module.exports = {
extends: 'airbnb',
root: true,
env: {
browser: true,
jest: true,
},
plugins: ['react', 'jsx-a11y', 'import', 'jest'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'react/jsx-filename-extension': [0],
'import/prefer-default-export': [0],
},
settings: {
'import/resolver': {
webpack: {
config: 'webpack.config.js',
},
},
},
parser: 'babel-eslint',
};
答案 0 :(得分:0)
此错误是由eslint-plugin-react
包引起的(我在this airbnb config issue之后发现)。
This PR解决了这个问题并包含更多信息。 The gist是eslint-plugin-react
软件包在<7.2> 中已修复,因此我需要做的只是yarn upgrade eslint-plugin-react
。