fix(lint): Change endOfLine rules to better support linting on Windows#311
fix(lint): Change endOfLine rules to better support linting on Windows#311HowardBraham merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
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
| "message": "This global is not available in the Node.js and browser environment." | ||
| }, | ||
| { | ||
| "name": "ClipboardItem", |
There was a problem hiding this comment.
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.
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.
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.
Okay I reverted those changes and the tests still passed
There was a problem hiding this comment.
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.
16.20.0
(same result on Node 14 and 18)
There was a problem hiding this comment.
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
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.