1. Relevant error reporting information
error 'test' is assigned a value but never used no-unused-vars
2. Error reporting reason
The eslint loader
is used for relevant syntax check. Because the test
variable has not been used and does not comply with relevant syntax rules, an error is reported.
3. Turn off related syntax checking
create a new Vue in the root directory of the related project config.JS
file
in Vue config.JS
file is configured as follows
module.exports = {
// Turn off syntax checking
lintOnSave: false
}
after restarting the project, it is found that the relevant error message disappears
See Vue cli configuration parameters for details
Read More:
- [Solved] Vue Error: error ‘xxx‘ is defined but never used no-unused-vars
- vue error: ‘ev’ is defined but never used (no-unused-vars)
- [Solved] Vue Error: error: ‘to‘ is defined but never used (no-unused-vars)
- xxx is assigned a value but never used [How to Solve]
- [Solved] Vue3.0 Error: The component has been registered but not used vue/no-unused-components, Close eslint
- Error: Computed property “menuList” was assigned to but it has no setter.
- Vue Project Error: Expected indentation of 2 spaces but found 4,Newline required at end of file but not found
- How to Test whether the property value of each property in the object is not empty
- [Solved] Vue unit test syntax error: unexpected token ‘export‘
- [Solved] VUE eslint Error: Expected linebreaks to be ‘LF‘ but found ‘CRLF
- Vue Error: component has been registered but not used [Two Methods to Solve]
- [Solved] ESLint error: Newline required at end of file but not found (eol-last)
- Error: Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] Vue project configurate test environment and package error
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- [Solved] Error Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] Error Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] Syntax Error: Error: No ESLint configuration found & TypeError: eslint.CLIEngine is not a constructor
- Newline required at end of file but not found eol-last [How to Solve]
- “Failed to load resource: net::ERR_FILE_NOT_FOUND” error. The project created by vue-cli 3.0 can run under dev, and an error is reported after packaging, and the page is blank.