style: remove eslint with frontend code removal ADR

- Add ADR for frontend code removal
- Drop eslint, as explained in the ADR
This commit is contained in:
Robert Raposa
2025-03-14 02:09:16 -04:00
committed by Feanil Patel
parent e9c52100ef
commit 399be67fc4
21 changed files with 152 additions and 484 deletions

View File

@@ -1,10 +1,16 @@
JavaScript in edx-platform
==========================
All frontend code (JavaScript) has been deprecated in edx-platform, in favor of
MFEs. See ADR 0023-frontend-code-and-eslint-removal.rst for details.
This documentation is being left in place until all of the JavaScript code
has been removed.
ES2015
------
All new JavaScript code in edx-platform should be written in ES2015.
All JavaScript code in edx-platform should be written in ES2015.
ES2015 is not a framework or library -- rather, it is the latest and
greatest revision of the JavaScript language itself, natively supported
in all modern browsers and engines. Think of it as JavaScript's
@@ -34,13 +40,7 @@ Adding a New ES2015 Module
~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't mix ES2015 and ES5 modules within directories. If necessary,
create a new directory just for your new file. If you create a new
directory, run the following from edx-platform root to copy over an
appropriate eslint config:
::
cp cms/static/js/features_jsx/.eslintrc.js path/to/your/directory
create a new directory just for your new file.
Give your new file an UpperCamelCase filename, such as
``MyAwesomeModule.js``. If it is a React module, use the ``.jsx``

View File

@@ -303,8 +303,6 @@ We use several tools to analyze code quality. The full set of them is::
make xsslint
make pii_check
make check_keywords
npm run lint
Where ``$PATHS...`` is a list of folders and files to analyze, or nothing if
you would like to analyze the entire codebase (which can take a while).

View File

@@ -0,0 +1,48 @@
Frontend code and ESLint removal
################################
Status
******
Accepted
Context
*******
Over many years work has been underway to extract frontend code from
edx-platform, to be replaced by MFEs.
Additionally, as of March 2025, edx-platform had more than 700 violations in
ESLint.
For more details on the MFE replacement, see:
- Top-level issue for edx-platform: https://github.com/openedx/edx-platform/issues/31620
- The parent issue of the above issue, which includes IDA frontends: https://github.com/openedx/wg-frontend/issues/156
- Details of the replacement MFEs are noted in the `MFE Rewrite Tracker`_.
.. _MFE Rewrite Tracker: https://openedx.atlassian.net/wiki/spaces/COMM/pages/4262363137/MFE+Rewrite+Tracker
Decision
********
Over these years of work, it was decided that all frontend code should
ultimately be removed from edx-platform. Until this time, there has not yet
been a single ADR or DEPR to capture this decision.
This decision record is to document this past decision. It is ok to add
additional links or details over time to clarify how this extraction will be
accomplished, or to one day celebrate its completion.
Additionally, it has been decided to preemptively remove ESLint. This will
ensure that engineers can stay focused on higher priority work, rather than
spending time fixing linting issues in JavaScript that will simply be removed.
This removal is important because github has started posting these violations
in github comments that make this work seem like a priority. At the very least,
these are annoying messages that clutter up PRs.
Consequences
************
We will continue to replace all frontend code in edx-platform with an
appropriate set of MFEs.