Skip to content

Commit

Permalink
Add ability to target specific files/directories to lint
Browse files Browse the repository at this point in the history
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
mcmire committed Feb 11, 2025
1 parent 060c729 commit 245a4a0
Showing 1 changed file with 221 additions and 117 deletions.
Loading

0 comments on commit 245a4a0

Please sign in to comment.