Skip to content

ROX-33736: Add no-non-deprecated-PropTypes lint rule with ignores#19548

Open
pedrottimark wants to merge 1 commit intomasterfrom
ROX-33736-pluginLimited-no-non-deprecated-PropTypes
Open

ROX-33736: Add no-non-deprecated-PropTypes lint rule with ignores#19548
pedrottimark wants to merge 1 commit intomasterfrom
ROX-33736-pluginLimited-no-non-deprecated-PropTypes

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Mar 23, 2026

Description

Objective

When we delete deprecated container folders, we intend to delete obsolete dependencies.

Problem

If non-deprecated files still depend on the dependencies (pardon pun) any additional unplanned technical investment might block deletion, because the effort will compete with other unplanned tasks.

Analysis

Find in Files import PropTypes has 172 results in 172 files.

files folder initial analysis
86 src/Components most or all deprecated
2 src/constants deprecated
23 src/Containers/Compliance deprecated
23 src/Containers/ConfigManagement deprecated
2 src/Images deprecated
2 src/Login rewrite in TypeScript
1 src/Containers/MainPage rewritten in TypeScript
1 src/Containers/Policies rewritten in TypeScript
4 src/Containers/Risk/EventTimeline deprecated
3 src/Containers/Risk/Process rewrite in TypeScript?
1 src/Containers/Risk/KeyValuePairs.jsx rewrite in TypeScript?
1 src/Containers/User/UserPage.jsx rewrite in TypeScript
21 src/Containers/VulnMgmt deprecated
2 src/Containers/Workflow deprecated
172

Solution

Use typescript-eslint playground to understand import PropTypes from 'prop-types'; statement.

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

  1. Edit pluginLimited.js file.

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

    • Add configuration object with ignores array and comments.

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 172 errors.

@pedrottimark pedrottimark requested a review from a team as a code owner March 23, 2026 16:02
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 5eb20a2.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-414-g5eb20a2ad1.

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.26%. Comparing base (b6542e2) to head (5eb20a2).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19548   +/-   ##
=======================================
  Coverage   49.26%   49.26%           
=======================================
  Files        2727     2727           
  Lines      205788   205788           
=======================================
  Hits       101376   101376           
- Misses      96879    96880    +1     
+ Partials     7533     7532    -1     
Flag Coverage Δ
go-unit-tests 49.26% <ø> (ø)

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.

@openshift-ci
Copy link

openshift-ci bot commented Mar 23, 2026

@pedrottimark: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocp-4-20-ui-e2e-tests 5eb20a2 link false /test ocp-4-20-ui-e2e-tests
ci/prow/ocp-4-21-ui-e2e-tests 5eb20a2 link false /test ocp-4-21-ui-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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