-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: fix windows-lint CI job #24758
fix: fix windows-lint CI job #24758
Conversation
Thanks for taking the time to open a PR!
|
@@ -2,4 +2,6 @@ | |||
|
|||
*.json text eol=lf | |||
|
|||
**/.eslintrc text eol=lf |
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.
This is the change that makes the windows-lint
job pass again
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -6,7 +6,10 @@ | |||
<script> | |||
export default { | |||
props: { | |||
msg: String, | |||
msg: { | |||
type: String, |
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.
Was this intended?
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, this was to resolve one of the warnings that was showing up during linting just to clean some things up. It looks like ESLint requires a default for Vue props the way we have it configured, or else it warns.
@@ -0,0 +1 @@ | |||
**/tsconfig.json |
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.
why don't we want to lint the tsconfig?
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 added these ignore files because there's a plugin that is already skipping these files and when it does it logs a warning. Wanted to clean those up
/root/cypress/packages/graphql/tsconfig.json
0:0 warning [@cypress/eslint-plugin-json]: Skipping file due to "json/json-with-comments-files" setting:
["**/tsconfig.json", ".vscode/**"]
To remove this warning add "tsconfig.json" to your `.eslintignore` file
The
windows-lint
CI job has been failing as of recent because of different line endings between Windows and Unix operating systems. We have configured Git to replace line endings in JSON files, but not in.eslintrc
files (which use JSON).So, when Circle checks out the code on Windows, the line endings are CRLF rather than LF. This causes ESLint to fail when linting
.eslintrc
files (which we only do innpm/eslint-plugin-dev/test
) because it is expecting different line endings.This PR adds
**/.eslintrc
files to the.gitattributes
configuration so that the line endings in those files are always LF, no matter the operating system. I also fixed the other warnings that were being logged in the lint job just to clean up some noise.Example failing
windows-lint
jobPassing
windows-lint
job on most recent commitI also added
--concurrency 2
to theyarn lint
command so that we don't run out of memory in CI (which has been happening recently in ourlinux-lint
runs)