-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix(lint): Change endOfLine rules to better support linting on Windows #311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why the default for endOfLine
changed in Prettier 2. It seems like something called "auto" should be the default. Oh well 🤷🏻♂️
Changes to the Prettier config look good, just had a question about the changes to environment.json
.
packages/base/src/environment.json
Outdated
@@ -209,6 +209,10 @@ | |||
"name": "ClipboardEvent", | |||
"message": "This global is not available in the Node.js and browser environment." | |||
}, | |||
{ | |||
"name": "ClipboardItem", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these changes also necessary to get things working on Windows or should these go in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good question. That's just what happened when I ran yarn generate
, but maybe it's not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible these files are out of date — we've been doing some dependency upgrades lately — but yeah, if the tests still pass here without these changes I'd say leave them out and we can address them in a new PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I reverted those changes and the tests still passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so when I run yarn generate
on your branch, I don't see any changes. Which Node version are you using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16.20.0
(same result on Node 14 and 18)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - that might be the reason. The Oh, I just saw your edit. Hmm, interesting. I'll have to look further into this..nvmrc
specifies v14, so that's the recommended dev version of Node for this repo. Probably need to bump this, but in any case, I think that explains the difference in globals.
2200116
to
ca833a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Before this PR, if you run eslint on Windows, you will get thousands of CRLF errors like this:
You can fix them with
yarn lint:fix
, but they will probably come back again, depending on your git and text editor settings.Meanwhile, git commits everything as LF, so it shouldn't affect Mac/Linux.