Eslint error reporting and resolution

1. ‘trailing spaces not allowed’ indicates that there are redundant spaces at the end of the line. Just delete them

2. The variable declared by ‘xxx’ is assigned a value but never used ‘is not used

3. ‘string must use singlequote’ just change double quotation marks into single quotation marks

4. There is a semicolon at the end of the ‘extra semicolon’ line (the default eslint configuration does not use semicolons)

5. There is a comma at the end of the ‘unexpected trailing comma’ line

6. ‘unexpected template string expression’ uses unnecessary template string expression

7. ‘xxx’ is never reassigned. Use ‘const’ variables declared with let are not reassigned later, and const is used instead

8. ‘Expected space(s) after “if”‘

  ‘Missing space before function parentheses’

     ‘ Missing space before opening brace’

     ‘ Expected space or tab after ‘/ /’ in comment ‘these are missing spaces

9. The error ‘unexpected side effect in “submitparames” calculated property’ is because I assigned values to other property values in the calculated property. It would be better to replace it with watch. It should be that the calculated property only performs simple operations, which is not good for changing the property value directly

10. ‘Identifier ‘col_ Names’ is not in camel case ‘

11. ‘unnecessary use of conditional expression for default assignment’ is because a ternary expression is used for the initialization of a value

12. ‘closing curry brace does not appear on the same line as the subsequence block’ braces are not on the same line as subsequent code blocks, for example, if… Else… Statements, else statements wrap

Read More: