kentcdodds / webpack-validator-DEPRECATED

Use this to save yourself some time when working on a webpack configuration.
MIT License
93 stars 8 forks source link

fix(win32): changes to allow working on windows #11

Closed mikekidder closed 8 years ago

mikekidder commented 8 years ago

Dude! Probably the most challenging submit I've had to date on Github.... Here you go.

-- no single-quotes in NPM package, escape with \" -- npm test cover and ava bump .... reworked, wasnt getting output (no lines) -- context/index.test.js .. absolute paths diff in windows -- entry/index.test.js .. folder paths between systems ("/" vs "\") -- test/configs.js ... couldn't find import

Reminder : remove the eslint rule for LF only

"npm run validate" run w/o errors. Please check

kentcdodds commented 8 years ago

Thanks! Looking now!

kentcdodds commented 8 years ago

Looks great. Just a few comments inline...

Also:

Reminder : remove the eslint rule for LF only

Is there a way we could configure .gitattributes to force LF only? Like @BarryThePenguin mentions

mikekidder commented 8 years ago

-- amend on commit, reverted npm run cover back, works for me!

kentcdodds commented 8 years ago

Do we need to say a .bit attributes file?

mikekidder commented 8 years ago

Still looking at it. Thought the whole CRLF vs LF was a non issue. I've pushed many PRs with Mac users without issue, despite my Git autoconverting to CRLF

BarryThePenguin commented 8 years ago

My understanding of the problem with CRLF vs LF is that eslint is looking for LF. There's no problem with git converting between the two, that works just fine.

The problem is a regular windows user will checkout with CRLF locally and eslint flags that as an error

mikekidder commented 8 years ago

OK, so if you want to have Windows users to conform with LF only

Windows Users - be sure Git is not autoconverting repo files from LF to CRLF, otherwise linting will fail.

git config --global core.autocrlf false

However, like I said, first time I've run across this via Lint rules. Don't think my PR converted the files. Did it?

And if you're dealing with Visual Studio users who don't know the command line. Good luck!

kentcdodds commented 8 years ago

You're right. I'll fix the linting rules. Thanks!

BarryThePenguin commented 8 years ago

Changing the linting rule makes more sense than enforcing LF...

Next, Tabs vs Spaces! :100:

kentcdodds commented 8 years ago

Nope. Two spaces for life :-P