Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information