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

jscs validateLineBreaks JS hinting error when running gulp commands #28

Open
cvan opened this issue Jun 3, 2017 · 6 comments
Open

jscs validateLineBreaks JS hinting error when running gulp commands #28

cvan opened this issue Jun 3, 2017 · 6 comments
Labels

Comments

@cvan
Copy link
Collaborator

cvan commented Jun 3, 2017

screenshot
screenshot

I'm on Windows. And I didn't get this error before, but now I do. I get this error when running npm run dev and npm run watch:

ERROR in ./src/js/index.js
jscs results in errors
  validateLineBreaks @ line 1 char 13
    validateLineBreaks: Invalid line break

ERROR in ./src/js/index.js
Module build failed: Error: Module failed in cause of jscs error.
    at Object.checkSource (C:\Users\mozilla\projects\puppets\node_modules\jscs-loader\index.js:116:13)
    at Object.<anonymous> (C:\Users\mozilla\projects\puppets\node_modules\jscs-loader\index.js:140:19)
    at Object.<anonymous> (C:\Users\mozilla\projects\puppets\node_modules\jscs-loader\index.js:47:14)
    at respond (C:\Users\mozilla\projects\puppets\node_modules\rcfinder\index.js:140:7)
    at next (C:\Users\mozilla\projects\puppets\node_modules\rcfinder\index.js:164:16)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Any ideas, @brianchirls?

@cvan cvan added the bug label Jun 3, 2017
@brianchirls
Copy link
Member

I'm sure I can fix that. I should probably replace jscs with eslint anyway, since the former is deprecated.

Not sure why you'd get it now but not before. Did you upgrade a dependency somewhere? Maybe something changed with string handling in Node 8.

@cvan
Copy link
Collaborator Author

cvan commented Jun 4, 2017

I tried "validateLineBreaks": null, "validateLineBreaks": false, and removing the whole object in the package.json, but nothing seems to work. I don't recall installing a new version of Node. Oh, I think I recall now: I've always had this installed and running on my Mac and just loaded it in on my Windows machine on my local network.

@brianchirls
Copy link
Member

Isn't there a git setting somewhere that fixes Windows stupid line breaks?

@brianchirls
Copy link
Member

I think maybe what I can do is remove that requirement but put something in git configuration to force unix line breaks on commit.

https://help.github.com/articles/dealing-with-line-endings/

In the meantime, seems like things here have gone a bit haywire with the upgrade to npm 5 so I have to fix that.

@brianchirls
Copy link
Member

@cvan I've never actually used git on Windows because cmd and powershell are such a mess and bash is only available in the last several months. But I think that by default git will convert line endings to whatever your platform wants when you check out and back to LF only when you check in. So I'm gonna just remove this requirement for now.

If you want, try checking in something on a temporary branch to see how the line endings come out.

brianchirls added a commit that referenced this issue Jun 5, 2017
@brianchirls
Copy link
Member

@cvan See if this fix helps and you can close this issue if so.

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

No branches or pull requests

2 participants