reason
Due to the end of line style configuration, endoofline configuration has the following four options:
lf
– line feed only (\n), which is common in Linux, MacOS and git repos
CRLF
– carriage return + line feed character (\r \n), and windows
CR
– carriage return character only (\r), Rarely use
auto
– keep the existing end of the line (the mixed values in a file are standardized by looking at the content used after the first line)
Solution:
Configure endOfLine: ‘auto’ in prettier.config.js:
module.exports = {
semi: false, // unterminated semicolon
singleQuote: true, // single quotes
quoteProps: 'as-needed',
trailingComma: 'none', // final comma
// The point is that this one should be configured as auto
endOfLine: 'auto'
}
Read More:
- [Solved] Syntax Error: Error: No ESLint configuration found & TypeError: eslint.CLIEngine is not a constructor
- Vscode save Vue format eslint check error [How to Solve]
- [Solved] Vue Project startup error: no eslint configuration found
- [Solved] VUE eslint Error: Expected linebreaks to be ‘LF‘ but found ‘CRLF
- Vue: How to Solve Eslint error
- [Solved] Eslint Error: Strings must use singlequote.
- [Solved] Vue eslint Error: Component name “*****“ should always be multi-word
- [Solved] ESLint error: Newline required at end of file but not found (eol-last)
- How to Solve Vscode save Vue file eslint error
- [Solved] Errors: 1 http://eslint.org/docs/rules/quotes…elementUI Import Error
- [Solved] ESlint Create New File Error: Component name “Home” should always be multi-word.
- [Solved] ESLint:TypeError: this.CliEngine is not a constructor
- [Solved] Vue 3 Script Setup ESLint Error: ‘defineProps‘ is not defined
- [Solved] ESLint: Parsing error: Unexpected token(prettier/prettier)
- vue eslint error ‘process‘ is not defined no-undef [How to Solve]
- ERROR in [eslint] ESLint is not a constructor (How to Solve)
- [Solved] Vue prettier error: error Delete `␍` prettier/prettier
- [Solved] Vue2.0 Error: Syntax Error: TypeError: eslint.CLIEngine is not a constructor
- [Solved] Vue3.0 Error: The component has been registered but not used vue/no-unused-components, Close eslint
- [Solved] Eslint Error: Parsing error: x-invalid-end-tag