jlengstorf / learn-rollup

This is an example project to accompany a tutorial on using Rollup.
https://code.lengstorf.com/learn-rollup-js/
ISC License
191 stars 61 forks source link

ESLint complains about line endings in Windows #8

Closed thgh closed 7 years ago

thgh commented 7 years ago

I was pretty much following the readme

projects>git clone git@github.com:jlengstorf/learn-rollup.git
projects>cd learn-rollup/
projects\learn-rollup>npm install
...
projects\learn-rollup>npm run dev

> learn-rollup@0.0.1 dev E:\git\learn-rollup
> rollup -c --watch

checking rollup-watch version...
bundling...

projects\learn-rollup\src\scripts\main.js
   1:55  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   2:29  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   3:1   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   4:40  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   5:45  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   6:39  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style`
...
36 problems (36 errors, 0 warnings)
jlengstorf commented 7 years ago

Yep, looks like you'll need to make the following adjustment in .eslintrc.json:

    "linebreak-style": [
      "error",
-     "unix"
+     "windows"
    ],
Anand4774 commented 6 years ago

Thanks... it works