Skip to content

@metamask/eslint config@6.0.0 - #442

Merged
rekmarks merged 10 commits into
developfrom
@metamask/eslint-config@6.0.0
Apr 15, 2021
Merged

rekmarks merged 10 commits into
developfrom
@metamask/eslint-config@6.0.0

Conversation

@rekmarks

@rekmarks rekmarks commented Apr 13, 2021 •

Copy link
Copy Markdown
Contributor

This PR adds @metamask/eslint-config@6.0.0 and sibling packages from that major version. As you can see, the diff is enormous. However, most of the changes are programmatic and contained within single commits, so reviewing won't be as bad as it looks.

The end result of this effort is to bring this repository onto the same lint standards as everywhere else in the organization. The package's own prettier config is removed.

Changes prefixed with "❗" required manual fixing and deserve extra attention.

  • 05500ab
    • This makes the necessary package updates and changes to .eslintrc.js
    • ❗ Notably, it stops extending the jest rules for every file, and moves them into an override targeting test files only.
    • ❗ Redundant rules were removed in this commit.
      • "Redundant" meaning they were identically configured by an extended config.
  • b99cdb0
    • ❗ Update the CI config and package scripts. The format scripts and CI job are removed since formatting is now done during lint.
  • b8fa351
    • Run yarn lint:fix and replace toEqual with toStrictEqual in tests.
    • Some instances of toEqual were left over after the rebase. They're fixed fdec723.
  • 2fa8725
    • ❗ Manually fix test failures resulting from the migration to toStrictEqual.
  • 257fc97
    • ❗ Manually replace jest .resolves matchers.
  • 5f3d819
    • ❗ Update local jest rules and move them to the override added in 5b4957c.
  • e5090fb
    • Remove lint-staged and the local prettier config.
  • fdec723
    • Run yarn lint:fix to fix all prettier violations following the removal of the local prettier config.
    • Replace remaining toEqual instances with toStrictEqual.

Base automatically changed from bump-node-version to develop April 13, 2021 16:17
@rekmarks
rekmarks marked this pull request as ready for review April 13, 2021 16:17
@rekmarks
rekmarks requested a review from a team as a code owner April 13, 2021 16:17
ryanml
ryanml previously approved these changes Apr 13, 2021

@ryanml ryanml 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.

Config changes look good and seem to be in line with recent changes across the organization. Programmatic diffs look fine as well. I'll additionally refer to @Gudahtt for review

@rekmarks

Copy link
Copy Markdown
Contributor Author

/yolo

@Gudahtt

Gudahtt commented Apr 13, 2021

Copy link
Copy Markdown
Member

I'm tempted to ask that this be delayed until after #378 and #387. Both of those PRs would have many conflicts with this, and I suspect it would be easier to resolve them in this PR because the last commit can be redone fairly easily (the yarn lint:fix one).

@rekmarks
rekmarks marked this pull request as draft April 13, 2021 23:35
Comment thread .eslintrc.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👀

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah I see, these are restricted matchers in our config that we use here? Maybe worth adding a comment explaining this

Comment thread .eslintrc.js Outdated
Comment thread .eslintrc.js Outdated
@rekmarks
rekmarks force-pushed the @metamask/eslint-config@6.0.0 branch 2 times, most recently from 7d1e059 to 76eb3f2 Compare April 14, 2021 16:03
@rekmarks
rekmarks force-pushed the @metamask/eslint-config@6.0.0 branch from 76eb3f2 to 0db3170 Compare April 15, 2021 18:20
@rekmarks
rekmarks marked this pull request as ready for review April 15, 2021 18:26
@rekmarks
rekmarks force-pushed the @metamask/eslint-config@6.0.0 branch from 0db3170 to 6baa86d Compare April 15, 2021 18:31

@Gudahtt Gudahtt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@rekmarks
rekmarks merged commit f421f1e into develop Apr 15, 2021
@rekmarks
rekmarks deleted the @metamask/eslint-config@6.0.0 branch April 15, 2021 22:38
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