cation:I test js-stack-from-scratch,my OS is windows.When I yarn start,it dead!
I know that the line-break-style of OS 'unix' or 'windows' is different, that make the error.
but how to deal it? My IDE is VSC. pageage 'gulp-eslint' is yarn add.
There are two ways you can achieve this. In both ways the objective is to change the linebreak style rule for eslint.
Add /*eslint linebreak-style: ["error", "windows"]*/ to the top of your file. This will only remove the error from the specific file you add this code to.
The more long term solution is the modify the code in the eslint.json file of your project. In general from the root of your project, you should find it in the root directory of your project named .eslint.json. Add the following code:
,
"rules": {
"linebreak-style": 0
}
The comma is for the line above it after the closing bracket of whatever other parameter is in the file.
There are two ways you can achieve this. In both ways the objective is to change the linebreak style rule for eslint.
Add
/*eslint linebreak-style: ["error", "windows"]*/
to the top of your file. This will only remove the error from the specific file you add this code to.The more long term solution is the modify the code in the eslint.json file of your project. In general from the root of your project, you should find it in the root directory of your project named
.eslint.json
. Add the following code:, "rules": { "linebreak-style": 0 }
The comma is for the line above it after the closing bracket of whatever other parameter is in the file.