After I import axios import axios from "axios";
in my App.vue
file, I got axios is defined but never used
error. I attached the error image and package.json
code. I installed axios
. How to fix it ?
The package.json file is:
{
"name": "myvue",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@mdi/font": "^3.6.95",
"@vue/test-utils": "^1.0.0-beta.29",
"axios": "^0.19.0",
"core-js": "^3.3.2",
"material-design-icons-iconfont": "^5.0.1",
"roboto-fontface": "*",
"vue": "^2.6.10",
"vuetify": "^2.1.10"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/cli-service": "^4.0.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-cli-plugin-vuetify": "^2.0.2",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.0"
}
}
You can solve this by updating your package.json
file, under "eslintConfig"
like:
...
"rules": {
"no-console": "off",
"no-unused-vars": "off"
}
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With