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

Add Jest linting - Add lint to remind you not to leave in an exclusive/focused test #33

Merged
merged 9 commits into from
Feb 7, 2023

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Nov 9, 2022

Add Jest linting. Rules: https://github.com/jest-community/eslint-plugin-jest#rules

Spawning from matrix-org/matrix-js-sdk#2856 (comment) where I really only was after jest/no-focused-tests to remind you not to leave in an exclusive/focused test but it doesn't seem harmful to add the rest of the "recommended" ones. Hopefully we don't have to battle a pile of changes in our downstream repos to get usage adopted.


References:

@MadLittleMods MadLittleMods changed the title Add lint to remind you not to leave an focused/exclusive test in Add lint to remind you not to leave an exclusive/focused test in Nov 9, 2022
@MadLittleMods MadLittleMods changed the title Add lint to remind you not to leave an exclusive/focused test in Add lint to remind you not to leave in an exclusive/focused test Nov 9, 2022
@MadLittleMods MadLittleMods marked this pull request as ready for review November 9, 2022 21:43
@MadLittleMods MadLittleMods requested a review from a team as a code owner November 9, 2022 21:43
@MadLittleMods MadLittleMods requested review from kerryarchibald and weeman1337 and removed request for a team November 9, 2022 21:43
Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

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

I like the idea adding the rules.

Jest should be added here as well https://github.com/matrix-org/eslint-plugin-matrix-org/blob/main/index.js

README.md Outdated Show resolved Hide resolved
MadLittleMods and others added 2 commits November 10, 2022 11:22
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

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

@MadLittleMods can you update the branch?

Also it would be nice to have a JS SDK PR that previews the changes, if all the rules are applied. Adapting to code may take some time:

✖ 332 problems (209 errors, 123 warnings)
  61 errors and 0 warnings potentially fixable with the `--fix` option.

(output for JS SDK using this branch with main merged)

@MadLittleMods MadLittleMods changed the title Add lint to remind you not to leave in an exclusive/focused test Add Jest linting - Add lint to remind you not to leave in an exclusive/focused test Dec 14, 2022
Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks for your work on the tests!

jest.js Outdated Show resolved Hide resolved
@weeman1337 weeman1337 force-pushed the madlittlemods/no-focused-exclusive-tests branch from 7a6fd4d to f430bfb Compare February 2, 2023 15:33
@weeman1337 weeman1337 merged commit 748389e into main Feb 7, 2023
@MadLittleMods
Copy link
Contributor Author

Thanks for wrangling a release here @weeman1337 😊

This is now part of eslint-plugin-matrix-org@1.0.0 🚀

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.

3 participants