Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

@metamask/eslint-config*@6.0.0, yarn lint:fix #102

Merged
merged 5 commits into from
Apr 26, 2021

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Apr 8, 2021

  • Add @metamask/eslint-config*@6.0.0 packages and peer dependencies
  • Update .eslintrc.js
    • Remove json ESLint plugin
  • Update lint scripts per the module template
  • yarn lint:fix

I had to run yarn lint:fix again in the latest commit due to the rebase. Aside from package.json and .eslintrc.js, no manual edits were made to any files.

@rekmarks rekmarks force-pushed the @metamask/eslint-config@6.0.0 branch from d7babad to 5bfd9fe Compare April 9, 2021 03:36
@rekmarks rekmarks marked this pull request as draft April 15, 2021 20:04
@rekmarks
Copy link
Member Author

rekmarks commented Apr 15, 2021

Gonna wait from some unit test PRs to land.

This is ready to go.

@rekmarks rekmarks force-pushed the @metamask/eslint-config@6.0.0 branch from 23d7f99 to 9b9f741 Compare April 24, 2021 21:23
@rekmarks rekmarks force-pushed the @metamask/eslint-config@6.0.0 branch from 9b9f741 to 408913f Compare April 24, 2021 21:23
@rekmarks rekmarks marked this pull request as ready for review April 24, 2021 21:24
@rekmarks rekmarks mentioned this pull request Apr 26, 2021
8 tasks
@shanejonas shanejonas self-requested a review April 26, 2021 18:18
ManifestWalletProperty,
{
port: number;
dist: string;
outfileName: string;
},
]) {
] {
Copy link
Contributor

Choose a reason for hiding this comment

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

not related to this PR, but having this type inline is confusing to read with the formatting

Copy link
Member Author

Choose a reason for hiding this comment

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

If we lave this comment unresolved I'll get back to it!

@@ -138,19 +163,22 @@ export async function buildWeb3Wallet(argv: YargsArgs): Promise<[

return endWeb3Wallet();
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this function is used before its defined

Copy link
Member Author

Choose a reason for hiding this comment

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

The lint config permits hoisting for functions declared with the function keyword, and we do use that pattern in a variety of places throughout the codebase.

Copy link
Contributor

Choose a reason for hiding this comment

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

just confusing to read because it's used before its defined and returning like that reads as if it has unreachable code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since the order of the functions in this file predates / is orthogonal to the lint config, let's leave this unresolved and follow up on it in a separate issue or PR as well!

@@ -190,9 +212,13 @@ export async function manifest(argv: YargsArgs): Promise<void> {
}

if (isInvalid) {
throw new Error(`Manifest Error: package.json validation failed, please see above errors.`);
throw new Error(
`Manifest Error: package.json validation failed, please see above errors.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

should we still use backtick or ' if a string has no embedded expressions?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm inclined to permit it if the lint config permits it, which it does. I think it's configurable. I'm not sure what we should prefer 🤔

Captured here: MetaMask/eslint-config#174

verboseErrors: false,
v: false,
'_': ['init'],
'verboseErrors': false,
Copy link
Contributor

Choose a reason for hiding this comment

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

can i vote again to remove this quote keys thing lol

Copy link
Member Author

Choose a reason for hiding this comment

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

You can create an issue on https://github.com/MetaMask/eslint-config 😜

Copy link
Contributor

@shanejonas shanejonas Apr 26, 2021

Choose a reason for hiding this comment

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

@rekmarks rekmarks merged commit f7976cd into main Apr 26, 2021
@rekmarks rekmarks deleted the @metamask/eslint-config@6.0.0 branch April 26, 2021 21:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants