Vue Project Error: Expected indentation of 2 spaces but found 4,Newline required at end of file but not found

Several error messages were encountered when learning Vue project was packaged

★   Extra semicolon

The first is that there is an additional semicolon. The error query found that main.js does have a semicolon. After we deleted it, the error disappeared

★   Expected indentation of 2 spaces but found 4

The second one is “expected to indent 2 spaces, but found 4”. After Baidu search, it is found that this is not an error, but a check rule. Find this file in the project and add this configuration. See the figure below

★   Newline required at end of file but not found

The third one is more wonderful. It means that “line breaks are required at the end of the file, but they are not found”. Then we go to the error file, that is, main.js. We can solve the error by typing enter at the end. See the figure below

Adding a blank line here can solve the problem of error reporting

Read More: