If there is an error, solve it: ‘action’ is defined but never used no unused vars
* * error reason: * * because the built Vue project selects the eslint verification specification -> The eslint specification is that you either don’t define a variable or you must use it if you define it
Solution:
Add the following code into the package.json file (restart the project after saving!!!)
"rules": {
"generator-star-spacing": "off",
"no-tabs":"off",
"no-unused-vars":"off",
"no-console":"off",
"no-irregular-whitespace":"off",
"no-debugger": "off"
}
Read More:
- [Solved] Vue Error: error: ‘to‘ is defined but never used (no-unused-vars)
- vue error: ‘ev’ is defined but never used (no-unused-vars)
- [Solved] error ‘test‘ is assigned a value but never used no-unused-vars
- [Solved] Vue3.0 Error: The component has been registered but not used vue/no-unused-components, Close eslint
- xxx is assigned a value but never used [How to Solve]
- [Solved] Vue item error: Regeneratorruntime is not defined
- [Solved] Vue 3 Script Setup ESLint Error: ‘defineProps‘ is not defined
- Vue Error: component has been registered but not used [Two Methods to Solve]
- vue eslint error ‘process‘ is not defined no-undef [How to Solve]
- [Solved] JQuery each Method Error: $XXX is not defined
- [Solved] vite2+vue3 jsx Error: React is not defined
- Ant design vue table Error: h is not defined [How to Solve]
- How to Solve “Vue is not defined” Error
- [Solved] Vue3 process Error: Uncaught ReferenceError: process is not defined
- Vue Project Error: Expected indentation of 2 spaces but found 4,Newline required at end of file but not found
- [Solved] VUE eslint Error: Expected linebreaks to be ‘LF‘ but found ‘CRLF
- [Solved] Yapi Secondary deploy error: xxx validation failed: mock: Path `xxx` is required
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- [Solved] Vue Error: template or render function not defined
- [Solved] Vue3 Configuration routing error: Catch all routes (“*“) must now be defined using a param with a custom regexp.