Opened 5 years ago

Last modified 3 years ago

#5524 assigned enhancement

Have all JS source code pass ESLint — at Initial Version

Reported by: Krinkle Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Build & Packages Keywords: contributor-experience
Cc: Patch:

Description

ESLint helps in three main areas:

  • valid syntax (because syntax errors might not be found easily otherwise, given code is loaded on-demand only),
  • consistent style for the code (style rules),
  • detect and prevent common bugs by disallowing fragile or broken code (quality rules).

By default it only does syntax validation. But r20364 introduced a few style and quality rules as well.

Right now, there's a lot of violations in the source code, causing noise during code review.

It seems there may be a few rules we no longer agree with, in which case we should disable or change them to match our desired outcome.

For other cases, we should just fix them wholesale once and have a clean build going forward.

The style rules can be easily and safely auto-fixed by eslint --fix, which performs non-semantic changes only. The quality violations are best addressed in smaller changes focussing on an individual area only with understanding of local context.

Change History (0)

Note: See TracTickets for help on using tickets.