Skip to content

ROX-32615: Add no-non-deprecated-JavaScript lint rule with ignores#18443

Merged
pedrottimark merged 1 commit intomasterfrom
ROX-32615-pluginLimited-no-non-deprecated-JavaScript
Mar 19, 2026
Merged

ROX-32615: Add no-non-deprecated-JavaScript lint rule with ignores#18443
pedrottimark merged 1 commit intomasterfrom
ROX-32615-pluginLimited-no-non-deprecated-JavaScript

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Jan 12, 2026

Description

Opportunity

Suggestion by Saif that we rewrite reside of JavaScript files in TypeScript.

TL;DR only about 15 candidates

Problem

Distinguish which JavaScript files need rewrite in TypeScript:

  • Do not need because in (or used only by) deprecated route.
  • Do need because in (or used by) TypeScript route.
  • Needs research to decide.
  • Deferred, especially pending decision about Configuration Management

Analysis

In ui/apps/platform folder:

find src --type f --name "*.js"
find src --type f --naem "*.jsx"
extname count
.js 236
.jsx 293
529

Solution

Use typescript-eslint playground to see that Program is type of root node.

https://typescript-eslint.io/play/#ts=5.9.3&showAST=es&fileType=.tsx

Read that return value of path.extname includes period.

https://nodejs.org/docs/latest/api/path.html#pathextnamepath

  1. Add triage-JavaScript-TypeScript lint rule/tool to document file or folders:

    • // deprecated
    • // rewrite
    • // research
    • // deferred
  2. Delete obsolete src/mockData/baselineStatuses.js file.

  3. Delete files which content can move into only one file that uses it.

  4. Move files used in only one container folder.

  5. Fix one error for moved file from no-logical-or-preceding-array-or-object rule.

User-facing documentation

  • CHANGELOG.md not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added lint rule
  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  1. npm run tsc in ui/apps/platform folder.
  2. npm run lint:fast-dev in ui/apps/platform folder.

@pedrottimark pedrottimark requested a review from a team as a code owner January 12, 2026 17:34
@rhacs-bot
Copy link
Contributor

rhacs-bot commented Jan 12, 2026

Images are ready for the commit at b4fb2ff.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-385-gb4fb2ff1f1.

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.27%. Comparing base (7a018d9) to head (b4fb2ff).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #18443   +/-   ##
=======================================
  Coverage   49.27%   49.27%           
=======================================
  Files        2726     2726           
  Lines      205625   205625           
=======================================
+ Hits       101312   101319    +7     
+ Misses      96777    96772    -5     
+ Partials     7536     7534    -2     
Flag Coverage Δ
go-unit-tests 49.27% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pedrottimark
Copy link
Contributor Author

ui-e2e-tests failure has been fixed in #18422

Workload CVE overview page tests Layer type filter tests should apply Layer type filter correctly

@pedrottimark pedrottimark force-pushed the ROX-32615-pluginLimited-no-non-deprecated-JavaScript branch from 16a5fe3 to b4fb2ff Compare March 19, 2026 18:49
@pedrottimark pedrottimark merged commit f520b63 into master Mar 19, 2026
92 checks passed
@pedrottimark pedrottimark deleted the ROX-32615-pluginLimited-no-non-deprecated-JavaScript branch March 19, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants