Skip to content

Conversation

khaninD
Copy link
Contributor

@khaninD khaninD commented Sep 23, 2017

I use windows and i have CRLF and i have problem with eslint linebreak-style option ... this option cancel of check CRLF or LF linebreak style ...

@AllenFang
Copy link
Member

HI @khaninD I think you can try to add .editorconfig and the content can be

end_of_line = lf

Not sure if it is work on widows, but if it's work, please consider to use this solution also it's worthy to commit to code base. thanks

@khaninD
Copy link
Contributor Author

khaninD commented Oct 10, 2017

@AllenFang , eslint show errors.
image

If i added end_of_line = if to .editorconfig,, new files will be with LF style, but old files will be CRLF ...

@AllenFang
Copy link
Member

AllenFang commented Oct 11, 2017

If i added end_of_line = if to .editorconfig,, new files will be with LF style, but old files will be CRLF ...

hmm... that's correct, how about you delete the repo and clone again? or use --fix to fix the legacy CRLF files?

Anyway, I dont think disable the linebreak-style is best solution, it will make our codebase without consistency line break, if above solution is not work for you, I think you can enforce the line breaking on widows with CRLF by:

"linebreak-style": ["error", "windows"]

This solution maybe more safety.

@AllenFang
Copy link
Member

Close it due to no response

@AllenFang AllenFang closed this Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants