-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
@metamask/eslint config@6.0.0 #442
Conversation
There was a problem hiding this comment.
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
|
.eslintrc.js
Outdated
'error', | ||
{ | ||
resolves: 'Use `expect(await promise)` instead.', | ||
// 'toBeFalsy': 'Avoid `toBeFalsy`', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
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
7d1e059
to
76eb3f2
Compare
76eb3f2
to
0db3170
Compare
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
0db3170
to
6baa86d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
- Add restricted controller messenger ([#378](#378)) - **BREAKING:** Update minimum Node.js version to v12 ([#441](#441)) - **BREAKING:** Replace controller context ([#387](#387)) - Bump @metamask/contract-metadata from 1.23.0 to 1.24.0 ([#440](#440)) - Update lint rules ([#442](#442), [#426](#426)) - Don't remove collectibles during auto detection ([#439](#439))
* @metamask/eslint*config@6.0.0 * Make necessary package updates and changes to .eslintrc.js. * Remove lint*staged dependency * Remove the local Prettier config * Remove rules made redundant by new config * Update the CI config and package scripts. * The `format` scripts and CI job were removed since formatting is now done during the lint script. * Only extend Jest rules for test files, update Jest rules * Replace "toEqual" with "toStrictEqual" in tests * Replace Jest "resolves" matchers with config-permitted equivalents * Run `yarn lint:fix` and replace `toEqual` with `toStrictEqual` in tests.
* @metamask/eslint*config@6.0.0 * Make necessary package updates and changes to .eslintrc.js. * Remove lint*staged dependency * Remove the local Prettier config * Remove rules made redundant by new config * Update the CI config and package scripts. * The `format` scripts and CI job were removed since formatting is now done during the lint script. * Only extend Jest rules for test files, update Jest rules * Replace "toEqual" with "toStrictEqual" in tests * Replace Jest "resolves" matchers with config-permitted equivalents * Run `yarn lint:fix` and replace `toEqual` with `toStrictEqual` in tests.
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.
.eslintrc.js
jest
rules for every file, and moves them into an override targeting test files only.format
scripts and CI job are removed since formatting is now done duringlint
.yarn lint:fix
and replacetoEqual
withtoStrictEqual
in tests.toEqual
were left over after the rebase. They're fixed fdec723.toStrictEqual
.jest
.resolves
matchers.jest
rules and move them to the override added in 5b4957c.lint-staged
and the localprettier
config.yarn lint:fix
to fix all prettier violations following the removal of the localprettier
config.toEqual
instances withtoStrictEqual
.