-
Notifications
You must be signed in to change notification settings - Fork 38
Upgrade to @ethereumjs/eslint-config and lint #153
Conversation
// Duplicates the (more tolerant) @typescript-eslint/no-unused-vars | ||
'no-unused-vars': 'off' | ||
} | ||
} |
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.
Small note about parserOptions
... was getting an error complaining of files unreachable through the tsconfig similar to:
error: Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: unusedFile.ts.
The file must be included in at least one of the projects provided at unusedFile.ts:
Have followed the suggestions at typescript-eslint#parserOptions.project to add the browser
folder files and webpack.config.js
to the lint set.
@@ -99,7 +98,8 @@ export class Libp2pServer extends Server { | |||
}) | |||
}) | |||
} | |||
(this.node as Libp2pNode).on('peer:discovery', async (peerInfo: any) => { | |||
// eslint-disable-next-line no-extra-semi | |||
;(this.node as Libp2pNode).on('peer:discovery', async (peerInfo: any) => { |
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 were 8 locations where prettier requires we insert a semicolon to prevent potential ASI failures. However eslint (correctly?) complains these are unnecessary - e.g. their views conflict.
Deferred to prettier in this case because otherwise its semi rule would need to be turned off. (Not sure this is the right thing though...)
27f5cdd
to
7d69cef
Compare
05c1626
to
7d95394
Compare
7d69cef
to
99e9efa
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.
Whew, great, this could really be much quicker realized than I expected after my experiences with the monorepo battling. Cool! 😀
Ah, actually every no-unused-var was being reported twice, once by the "regular" The latter is more permissive - if you rename the var with an |
#148
NB: PR targets #152
Lints everything. Mostly automated fixes but have put the things done manually in a sequence of separate commits.
The meaningful config commits are:
The pre-commit hook works out of the box, it's great.