eslint common error resolution

error Unnecessarily quoted property '145' found quote-props
Indicates that the key does not need to be quoted

Object properties must go on a new line if they aren't all on the same line
Prompt syntax error, if object properties are not all on the same line, they must be on a new line

error Trailing spaces not allowed no-trailing-spaces
This is too much space, just delete the extra space and check if there is any extra space at the end of the error line

error Extra semicolon semi
Check if there is a semicolon in the error line to remove the error.
If you want to use a semicolon, add a configuration in the rules field:
'semi': ["error", "always"]
so that the end of each expression in the js code should end with a semicolon. Otherwise, eslint will give an error message
if you want eslint Do not check the semicolon at this time. The semicolon at the end can also be omitted or configured in the rules field:
'semi': 0

Published 41 original articles · Likes2 · Visits 1836

Guess you like

Origin blog.csdn.net/weixin_43883485/article/details/104884416