点击提示跳转过去:光标指向
感觉是什么地方配置的问题
.eslintrc.js
/* eslint-disable */
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/essential',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never',
}],
// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e', // for e.returnvalue
],
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['test/unit/index.js'],
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'guard-for-in': 'off',
'linebreak-style': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-mixed-operators': 'off',
'no-template-curly-in-string': 'off',
'max-len': 'off',
'no-underscore-dangle': 'off',
'radix': 'off',
'prefer-destructuring': 'off',
'no-shadow': 'off',
'mini-css-extract-plugin': 'off',
},
};
在你的配置文件中对
import/extensions
这条规则进行了配置,报错信息说找不到 import/extensions 这条规则
。这条规则包含在eslint-plugin-import
插件中,但好像你没有安装。然后把配置文件加上:
试下看看。