- Enabling `enable_type_aware_eslint_checks` by default in build_webui().
- Fixing a few remaining violations that were not already fixed in
precursor CLs.
- Fix the dependnecies of the ":lint" target for the case of
`use_javascript_coverage=true`
- Add a new "ESLint checks" section in styleguide/web/web.md explaining
the two different types of ESLint checks.
- Update Chromium styleguide additions to include what will be
enfroced by @typescript-eslint/require-await as part of this CL,
and @typescript-eslint/no-unnecessary-type-assertion in upcoming
CLs.
Bug: 394634491
Change-Id: I59a07d4e76339449c3e5ff79608b57154a3e32cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6250398
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418375}
Type-aware ESLint checks (see [1], [2]) can do more sophisticated checks
compared to non type-aware checks which run during presubmit.
- Implement a new `eslint_ts()` GN rule along with corresponding
tests.
- Hook it up to `build_webui()`.
- Guard it with a new `enable_type_aware_eslint_checks` flag that
defaults to `false`.
The new flag will be enabled on a target-by-target basis or as a whole
once existing violations are fixed. Initially applying only
@typescript-eslint/require-await when the flag is enabled. More checks
will be added eventually.
[1] https://typescript-eslint.io/rules/?=typeInformation
[2] https://typescript-eslint.io/getting-started/typed-linting/
Bug: 394634491
Change-Id: Id2255656786fc144f95801f399bc34520c910cca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5252273
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1417633}