Skip to content

ROX-33769: Add no-non-deprecated-Component lint rule with ignores#19582

Open
pedrottimark wants to merge 1 commit intomasterfrom
ROX-33769-pluginLimited-no-non-deprecated-Component
Open

ROX-33769: Add no-non-deprecated-Component lint rule with ignores#19582
pedrottimark wants to merge 1 commit intomasterfrom
ROX-33769-pluginLimited-no-non-deprecated-Component

Conversation

@pedrottimark
Copy link
Contributor

Description

Objective

When we delete deprecated container folders, we intend to have no more occurrences of superseded patterns.

Problem

The need to understand code that has superseded patterns:

  • has caused the team to avoid worthwhile technical investment
  • has risk that occasional contributors follow those patterns
  • contradicts our “help AI to help us” principle

Analysis

Find in Files extends Component has 20 results in 20 files.

Solution

Use typescript-eslint playground to understand class Whatever extends Component { … } declaration.

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

  1. Edit pluginLimited.js file.

    • Add no-non-deprecated-Component lint rule.
  2. Edit eslint.config.js file.

    • Add configuration object with ignores array and comments.
  3. Edit ErrorBoundary.tsx file

    • Add eslint disable and enable comments, because function component is not an alternative as far as I understand.

User-facing documentation

  • CHANGELOG.md update is 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.

    With configuration object but without ignores property see expected 20 errors.

@pedrottimark pedrottimark requested a review from a team as a code owner March 24, 2026 20:42
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 069581c.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-434-g069581cc97.

@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.26%. Comparing base (5d84b54) to head (069581c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19582      +/-   ##
==========================================
- Coverage   49.26%   49.26%   -0.01%     
==========================================
  Files        2735     2735              
  Lines      206138   206138              
==========================================
- Hits       101550   101549       -1     
- Misses      97041    97042       +1     
  Partials     7547     7547              
Flag Coverage Δ
go-unit-tests 49.26% <ø> (-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.

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.

2 participants