Skip to content

Commit 245a4a0

Browse files
committed
Add ability to target specific files/directories to lint
Currently, there are a ton of lint warnings, and it would be good to address them sooner rather than later. To make PRs easier to approve, we could batch lint violation fixes by codeowner. That is, open PRs progressively by addressing all lint violations for packages owned by the Wallet Framework team first, then the Accounts team, then the Confirmations team, etc. To do this, we need a way to run ESLint on specific directories. That's what this PR does. Now you can say, for example: ``` yarn lint:eslint packages/network-controller --fix ``` and now ESLint will run just on `network-controller` files, and autofix any warnings automatically. One thing to keep in mind here is that we also want to keep the warning thresholds file up to date. This is a bit tricky because if we were to run ``` yarn lint:eslint packages/network-controller --quiet ``` then ESLint would only process lint errors and not warnings + errors. If this command is successful, i.e., there are no lint errors found, then we don't want the warning thresholds file to be blown away. So this commit also contains updates to the logic to ensure this doesn't happen.
1 parent 060c729 commit 245a4a0

File tree

1 file changed

+221
-117
lines changed

1 file changed

+221
-117
lines changed

0 commit comments

Comments
 (0)