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

Lint fails on Windows on end of line break #464

Closed
summer-ji-eng opened this issue Apr 1, 2020 · 6 comments
Closed

Lint fails on Windows on end of line break #464

summer-ji-eng opened this issue Apr 1, 2020 · 6 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@summer-ji-eng
Copy link
Contributor

Problem:
googleapis/gcs-resumable-upload ci/windows fail due to linter issue of end of line break style for windows (see here)

To temporary unblock me, I removed posttest in package.json, here

Fix Suggestion from @bcoe:
Instead of add .gitattribute to elf in single repo gcs-resumable-upload for windows (example),

maybe in .github/workflows/ci.yaml , add one extra command for windows that just does:
run: print "*.ts text eol=lf\n*.js test eol=lf" > .gitattributes

Steps to reproduce

  1. add "posttest": "npm run lint", in repo package.json

Feel free to @summer-ji-eng if you have any question. Thanks!

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 2, 2020
@SurferJeffAtGoogle
Copy link
Contributor

@bcoe Is there an option to make eslint accept all variations of line endings?

@bcoe
Copy link
Contributor

bcoe commented Apr 3, 2020

@SurferJeffAtGoogle great question, I bet that's just a rule we could turn off.

@bcoe bcoe added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Apr 3, 2020
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Apr 3, 2020
@summer-ji-eng
Copy link
Contributor Author

summer-ji-eng commented Apr 3, 2020

@bcoe, @SurferJeffAtGoogle The rule to turn off could be // eslint-disable linebreak-style

@bcoe
Copy link
Contributor

bcoe commented Jun 17, 2020

@summer-ji-eng we could look at turning this off by default, I think that might be a good idea.

@summer-ji-eng
Copy link
Contributor Author

@summer-ji-eng we could look at turning this off by default, I think that might be a good idea.

To turn it off by default, one way is add .gitattributes(example) in nodejs template (this directory). @bcoe @SurferJeffAtGoogle LMK, if it is ok, I could sent the PR.

@summer-ji-eng
Copy link
Contributor Author

resolved in #647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants