Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ESLint warning thresholds, and produce them consistently (#5151)
The ESLint warning thresholds file records warnings that were produced the last time that `eslint` was run, categorizing them by rule. This file should be kept up to date at all times so we can know whether new code changes introduce a regression in the number of warnings or an improvement. Specifically, the lint step will now fail if more warnings are introduced to the codebase. However, in the past we have observed inconsistencies in the behavior of ESLint across different people's machines as well as in CI. With the addition of the quality gate this means that some people are unable to merge PRs because warnings are produced that are not seen in development, and the warnings may not be reproducible by other developers. With that said, we recently learned that if `dist` directories are present from a previous run of `yarn build`, it could affect the behavior of the TypeScript-specific lint rules and cause the observed inconsistencies. To mitigate this problem, this commit ensures that all `dist` directories are removed before running `eslint`. This indeed does change the number of warnings produced, and the thresholds file has been updated to reflect this.
- Loading branch information