Enable diff quality reporting on .jsx files in edx-platform

Description

We use diff-cover to generate diff quality reports for both python and js code. Its eslint invocation is not configurable, meaning we can't run it against any file types other than .js. It is possible to pass in cli options to eslint via the --options flag, but the option that actually matters in this case (--ext) doesn't work since diff-cover just uses its own baked in supported_extensions list instead.

I see three possible solutions here:

  • Submit an upstream PR against diff-cover to allow users to pass in their own supported_extensions. It looks as though they are receptive to PRs (bjacobel got something merged last year!)

  • Use a node-based tool for eslint diff quality reports instead

  • All of the above

IMO, we should switch to a different tool and start moving towards a fully node-based frontend build process. ESLint itself has supported jsx out of the box for three years now – it's not like it's a bleeding-edge feature. Relying on third-party Python packages (like this one) to handle JS-specific logic introduces brittle overabstraction into our toolchain. While these packages may be great for handling Python code, their JS support often lags behind current tooling, meaning we miss out on crucial test coverage.

AC:

  • diff quality reports catch quality errors on changes to .jsx files

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

Unassigned

Reporter

Ari Rizzitano

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Priority

CAT-2
Configure