Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Add support for Windows Line Endings by removing the linebreak-style rule #56

Open
ntwb opened this issue Jun 29, 2018 · 2 comments
Open

Comments

@ntwb
Copy link
Member

ntwb commented Jun 29, 2018

Via WordPress/gutenberg#7611 (comment)

Remove linebreak-style rule:

// Disallow mixed "LF" and "CRLF" as linebreaks
'linebreak-style': ['error', 'unix'],

..............................................
 312:2    error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
 313:1    error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
 314:25   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

✖ 75569 problems (75569 errors, 0 warnings)
@gmkhussain
Copy link

Open package.json, added following rules under rules line:

"rules": {
  "linebreak-style": 0,
  "global-require": 0,
  ...

for VScode users: click the option at the bottom-right of the window and set it to LF from CRLF
errors will fixed for me

@kkmuffme
Copy link

Against it, if you are using Windows line breaks just change your editor to use LF instead.
99% of the WP ecosystem is geared towards Linux and by allowing Windows line breaks it will just lead to issues for 98% of other developers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants