'errMsg' is defined but never used no-unused-vars

api.login({
      success: (errMsg, code) => {
        resolve(code)
      }
    })

for the above code, eslint reported the following error

"errMsg" is defined but never used  no-unused-vars

errMsg cannot be deleted because of the order of parameters. In this case, how to deal with it better?

Feb.28,2021
The

error indicates that you should know because this variable is defined but not used.
if you really don't need this variable, you can edit the .eslintrc.js file, and add a 'no-unused-vars': 0 to the rules attribute to ignore the eslint rule .
you can also do this if you encounter other eslint prompts later but don't want to report a similar error.


I remember that object deconstruction does not require order, just write a code, errMsg does not need to write.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5df2b-45785.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5df2b-45785.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?