I'm having trouble setting up eslint for my new vue cli project. I can't seem to get it to catch the errors I intentionally add, even though it passes without any issues. Any suggestions on what might be going wrong?
vue.config.js
devServer: {
overlay: {
warnings: true,
errors: true,
},
},
lintOnSave: true,
.eslintrc.js
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: "babel-eslint",
},
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
plugins: ["prettier"],
// add your custom rules here
rules: {
semi: "error",
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
},
};
src/App.vue:
...
methods: {
test() {
return true;
},
},
...
vue-cli-service lint results:
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="deaeacb1b4bbbdaa9ee">[email protected]</a> lint /project/location/component_library
> vue-cli-service lint
DONE No lint errors found!