This issue can't be edited

Because it belongs to an archived project. Jira admins can restore projects from the archive.

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

Release Notes

None

Reason for Variance

None

User Impact Summary

None

Lucidchart Diagrams

Activity

Show:

Ari Rizzitano November 6, 2017 at 5:09 PM

Bumping priority since this is beginning to become more and more of a problem in platform (see https://github.com/edx/edx-platform/pull/16240, https://github.com/edx/edx-platform/pull/16452)

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Priority

Zendesk Support

Created August 8, 2017 at 3:13 PM
Updated November 9, 2017 at 3:54 PM