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

[tests-only] override lint rules for tests/e2e #10562

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Mar 7, 2024

Description

To prevent mistakes like see here #10553 (which caused tests to be flaky), I have implemented override config for e2e tests with customized rules for tests/e2e. With this, we can have separate rules defined for the e2e test code.

Related Issue

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@saw-jan saw-jan added the QA:team label Mar 7, 2024
@saw-jan saw-jan self-assigned this Mar 7, 2024
@saw-jan saw-jan changed the title tests(e2e): extend eslint config for tests [tests-only] extend eslint config for tests Mar 7, 2024
@owncloud owncloud deleted a comment from update-docs bot Mar 7, 2024
@saw-jan saw-jan force-pushed the tests/separate-lint-rules branch from 05ebd82 to 2c51001 Compare March 11, 2024 06:50
@saw-jan saw-jan changed the title [tests-only] extend eslint config for tests [tests-only] override lint rules for tests/e2e Mar 11, 2024
@saw-jan saw-jan marked this pull request as ready for review March 11, 2024 06:58
Comment on lines +17 to +25
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off"
Copy link
Member Author

Choose a reason for hiding this comment

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

we will eventually change them to error if possible but in separate PRs because the changes would be large

Copy link
Contributor

@ScharfViktor ScharfViktor left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-03-11 at 09 29 49

Thanks Sajan 👍
maybe should we put a couple words to docs?

@saw-jan saw-jan requested a review from AlexAndBear March 11, 2024 08:38
@saw-jan
Copy link
Member Author

saw-jan commented Mar 11, 2024

maybe should we put a couple words to docs?

hmm, couldn't think of anything on what to put in the docs. any idea?

@ScharfViktor
Copy link
Contributor

hmm, couldn't think of anything on what to put in the docs. any idea?

something like:
lint test to find missing awaits: pnpm lint
manually change what the lint found and marked as error: pnpm lint --fix doesn't fix missing awaits

@saw-jan
Copy link
Member Author

saw-jan commented Mar 11, 2024

hmm, couldn't think of anything on what to put in the docs. any idea?

something like: lint test to find missing awaits: pnpm lint manually change what the lint found and marked as error: pnpm lint --fix doesn't fix missing awaits

done. added the docs

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@saw-jan saw-jan merged commit b51b4b9 into stable-8.0 Mar 11, 2024
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the tests/separate-lint-rules branch March 11, 2024 11:06
saw-jan added a commit that referenced this pull request Mar 11, 2024
* tests(e2e): use separate eslint config for tests

* tests(e2e): fix step args

* docs: add e2e lint section
saw-jan added a commit that referenced this pull request Mar 11, 2024
* tests(e2e): use separate eslint config for tests

* tests(e2e): fix step args

* docs: add e2e lint section
ownclouders pushed a commit that referenced this pull request Mar 11, 2024
* tests(e2e): use separate eslint config for tests

* tests(e2e): fix step args

* docs: add e2e lint section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants