vue-cli & plugin:vue/strongly-recommended bug
vue-cli & plugin:vue/strongly-recommended bug
ESLint
plugin:vue/strongly-recommended
module.exports = {
root: true,
env: {
node: true
},
// extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
extends: ["plugin:vue/essential", "eslint:vue/strongly-recommended", "@vue/prettier"],
parserOptions: {
parser: "babel-eslint"
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
jest: true
}
}
]
};
https://eslint.vuejs.org/user-guide/#bundle-configurations
https://eslint.vuejs.org/rules/attribute-hyphenation.html#vue-attribute-hyphenation
https://eslint.org/docs/user-guide/configuring
yarn run lint
yarn run v1.22.4
$ vue-cli-service lint
ERROR Error: Failed to load config "eslint:vue/strongly-recommended" to extend from.
Referenced from: /Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/.eslintrc.js
Error: Failed to load config "eslint:vue/strongly-recommended" to extend from.
Referenced from: /Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/.eslintrc.js
at configMissingError (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:265:9)
at ConfigArrayFactory._loadExtendedBuiltInConfig (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:759:15)
at ConfigArrayFactory._loadExtends (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:719:29)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:660:25)
at _normalizeObjectConfigDataBody.next (<anonymous>)
at ConfigArrayFactory._normalizeObjectConfigData (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:596:20)
at _normalizeObjectConfigData.next (<anonymous>)
at createConfigArray (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:340:25)
at ConfigArrayFactory.loadInDirectory (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/config-array-factory.js:433:16)
at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/xgqfrms-mbp/Documents/GitHub/Vue-2.x/vue-antd-pro/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:328:46)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14048826.html
未经授权禁止转载,违者必究!