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

fix: fix windows-lint CI job #24758

Merged
merged 6 commits into from Nov 22, 2022
Merged

fix: fix windows-lint CI job #24758

merged 6 commits into from Nov 22, 2022

Conversation

astone123
Copy link
Contributor

@astone123 astone123 commented Nov 21, 2022

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 in npm/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 job
Passing windows-lint job on most recent commit

I also added --concurrency 2 to the yarn lint command so that we don't run out of memory in CI (which has been happening recently in our linux-lint runs)

@astone123 astone123 self-assigned this Nov 21, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 21, 2022

Thanks for taking the time to open a PR!

@@ -2,4 +2,6 @@

*.json text eol=lf

**/.eslintrc text eol=lf
Copy link
Contributor Author

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

@cypress
Copy link

cypress bot commented Nov 21, 2022



Test summary

438 0 10 0Flakiness 1


Run details

Project cypress
Status Passed
Commit 375f736
Started Nov 22, 2022 5:39 PM
Ended Nov 22, 2022 5:51 PM
Duration 11:48 💡
OS Linux Debian -
Browser Chrome 106

View run in Cypress Dashboard ➡️


Flakiness

cypress/e2e/specs_list_latest_runs.cy.ts Flakiness
1 App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intended?

Copy link
Contributor Author

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.

@lmiller1990
Copy link
Contributor

image

Nice

@@ -0,0 +1 @@
**/tsconfig.json
Copy link
Member

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?

Copy link
Contributor Author

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

@astone123 astone123 merged commit 2166ba0 into develop Nov 22, 2022
@astone123 astone123 deleted the astone123/fix-windows-lint branch November 22, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants