Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter fails on linebreak style rule #20

Closed
maxlemieux opened this issue Apr 24, 2020 · 5 comments
Closed

Linter fails on linebreak style rule #20

maxlemieux opened this issue Apr 24, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@maxlemieux
Copy link
Collaborator

Error: .eslintrc.json:
Configuration for rule "linebreak-style" is invalid:
Value ["windows","unix"] should NOT have more than 1 items.

@maxlemieux maxlemieux added the bug Something isn't working label Apr 24, 2020
@maxlemieux
Copy link
Collaborator Author

My bad, looks like we can't specify both types......

@maxlemieux maxlemieux self-assigned this Apr 24, 2020
@maxlemieux
Copy link
Collaborator Author

Basically we have two options: Use Unix style LF '\n' or Windows style CRLF '\r\n'.

Most people seem to go with Unix style. I'm not sure what happens if we load a CRLF file on a Mac or Heroku - whether anything bad would happen.

We can fix it for the whole project by specifying a style in .eslintrc.json and running 'eslint --fix'.

@maxlemieux
Copy link
Collaborator Author

@maxlemieux
Copy link
Collaborator Author

maxlemieux commented Apr 25, 2020

diegohaz/arc#171 describes some approaches to solving this

@maxlemieux
Copy link
Collaborator Author

Adding a setting to vscode as described here seems to get Windows working with LF unix style: microsoft/vscode#7761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants