Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b0eff0f

Browse files
robrapfeanil
authored andcommittedMar 20, 2025··
style: remove eslint with frontend code removal ADR
- Add ADR for frontend code removal - Drop eslint, as explained in the ADR
1 parent 314e604 commit b0eff0f

File tree

21 files changed

+152
-484
lines changed

21 files changed

+152
-484
lines changed
 

‎.eslintignore

-82
This file was deleted.

‎.eslintrc.json

-77
This file was deleted.

‎.github/workflows/quality-checks.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,28 @@ jobs:
6060
PIP_SRC: ${{ runner.temp }}
6161
run: |
6262
make test-requirements
63-
63+
6464
- name: Install npm
6565
env:
6666
PIP_SRC: ${{ runner.temp }}
67-
run: npm ci
68-
67+
run: npm ci
68+
6969
- name: Install python packages
7070
env:
7171
PIP_SRC: ${{ runner.temp }}
7272
run: |
7373
pip install -e .
74-
74+
7575
- name: Run Quality Tests
7676
env:
7777
PIP_SRC: ${{ runner.temp }}
7878
TARGET_BRANCH: ${{ github.base_ref }}
7979
run: |
8080
make pycodestyle
81-
npm run lint
8281
make xsslint
8382
make pii_check
8483
make check_keywords
85-
84+
8685
- name: Save Job Artifacts
8786
if: always()
8887
uses: actions/upload-artifact@v4

‎cms/static/js/features_jsx/.eslintrc.js

-14
This file was deleted.

‎common/static/common/js/components/BlockBrowser/.eslintrc.js

-18
This file was deleted.

‎docs/concepts/frontend/javascript.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
JavaScript in edx-platform
22
==========================
33

4+
All frontend code (JavaScript) has been deprecated in edx-platform, in favor of
5+
MFEs. See ADR 0023-frontend-code-and-eslint-removal.rst for details.
6+
7+
This documentation is being left in place until all of the JavaScript code
8+
has been removed.
9+
410
ES2015
511
------
612

7-
All new JavaScript code in edx-platform should be written in ES2015.
13+
All JavaScript code in edx-platform should be written in ES2015.
814
ES2015 is not a framework or library -- rather, it is the latest and
915
greatest revision of the JavaScript language itself, natively supported
1016
in all modern browsers and engines. Think of it as JavaScript's
@@ -34,13 +40,7 @@ Adding a New ES2015 Module
3440
~~~~~~~~~~~~~~~~~~~~~~~~~~
3541

3642
Don't mix ES2015 and ES5 modules within directories. If necessary,
37-
create a new directory just for your new file. If you create a new
38-
directory, run the following from edx-platform root to copy over an
39-
appropriate eslint config:
40-
41-
::
42-
43-
cp cms/static/js/features_jsx/.eslintrc.js path/to/your/directory
43+
create a new directory just for your new file.
4444

4545
Give your new file an UpperCamelCase filename, such as
4646
``MyAwesomeModule.js``. If it is a React module, use the ``.jsx``

‎docs/concepts/testing/testing.rst

-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ We use several tools to analyze code quality. The full set of them is::
303303
make xsslint
304304
make pii_check
305305
make check_keywords
306-
npm run lint
307306

308307
Where ``$PATHS...`` is a list of folders and files to analyze, or nothing if
309308
you would like to analyze the entire codebase (which can take a while).
310-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Frontend code and ESLint removal
2+
################################
3+
4+
Status
5+
******
6+
7+
Accepted
8+
9+
Context
10+
*******
11+
12+
Over many years work has been underway to extract frontend code from
13+
edx-platform, to be replaced by MFEs.
14+
15+
Additionally, as of March 2025, edx-platform had more than 700 violations in
16+
ESLint.
17+
18+
For more details on the MFE replacement, see:
19+
20+
- Top-level issue for edx-platform: https://github.com/openedx/edx-platform/issues/31620
21+
- The parent issue of the above issue, which includes IDA frontends: https://github.com/openedx/wg-frontend/issues/156
22+
- Details of the replacement MFEs are noted in the `MFE Rewrite Tracker`_.
23+
24+
.. _MFE Rewrite Tracker: https://openedx.atlassian.net/wiki/spaces/COMM/pages/4262363137/MFE+Rewrite+Tracker
25+
26+
Decision
27+
********
28+
29+
Over these years of work, it was decided that all frontend code should
30+
ultimately be removed from edx-platform. Until this time, there has not yet
31+
been a single ADR or DEPR to capture this decision.
32+
33+
This decision record is to document this past decision. It is ok to add
34+
additional links or details over time to clarify how this extraction will be
35+
accomplished, or to one day celebrate its completion.
36+
37+
Additionally, it has been decided to preemptively remove ESLint. This will
38+
ensure that engineers can stay focused on higher priority work, rather than
39+
spending time fixing linting issues in JavaScript that will simply be removed.
40+
This removal is important because github has started posting these violations
41+
in github comments that make this work seem like a priority. At the very least,
42+
these are annoying messages that clutter up PRs.
43+
44+
Consequences
45+
************
46+
47+
We will continue to replace all frontend code in edx-platform with an
48+
appropriate set of MFEs.

‎lms/djangoapps/instructor/static/instructor/.eslintrc.js

-19
This file was deleted.

‎lms/djangoapps/support/static/support/jsx/.eslintrc.js

-19
This file was deleted.

‎lms/djangoapps/teams/static/teams/js/.eslintrc.json

-7
This file was deleted.

‎lms/static/completion/js/.eslintrc.js

-14
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.