Skip to content

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

Merged
weeman1337 merged 9 commits into
mainfrom
madlittlemods/no-focused-exclusive-tests
Feb 7, 2023
Merged

Add Jest linting - Add lint to remind you not to leave in an exclusive/focused test#33
weeman1337 merged 9 commits into
mainfrom
madlittlemods/no-focused-exclusive-tests

Conversation

@MadLittleMods

@MadLittleMods MadLittleMods commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

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

@weeman1337 weeman1337 left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread README.md Outdated
MadLittleMods and others added 2 commits November 10, 2022 11:22
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Comment thread README.md
@t3chguy t3chguy requested a review from weeman1337 December 13, 2022 09:29

@weeman1337 weeman1337 left a comment

Copy link
Copy Markdown
Contributor

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)

Comment thread README.md
@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

@weeman1337 weeman1337 left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread jest.js Outdated
@weeman1337 weeman1337 force-pushed the madlittlemods/no-focused-exclusive-tests branch from 7a6fd4d to f430bfb Compare February 2, 2023 15:33
@weeman1337 weeman1337 requested a review from richvdh February 7, 2023 15:45
@weeman1337 weeman1337 merged commit 748389e into main Feb 7, 2023
@MadLittleMods

Copy link
Copy Markdown
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