[Solved] error ‘test‘ is assigned a value but never used no-unused-vars

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: