Skip to content

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Dec 2, 2025

Description

Toward Q4 AI goal: help AI to help us.

Also for human finger memory of earlier idiom.

Prevent inconsistencies while writing code in editor instead via change requests by reviewers in contributions.

Problem

Finger memory types || when ?? is more precise for right node:

  • ArrayExpression
  • ObjectExpression

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing

Analysis

128 errors in 70 files:

  • 21 files not in src/Containers folder
  • 49 files in src/Containers folder
    • 8 files in 2 deprecated subfolders
    • 41 files in 12 non-deprecated subfolders
files subfolder
1 AccessControl
1 Audit
3 Compliance
3 ComplianceEnhanced
10 ConfigManagement
1 MitreAttackVectors
6 NetworkGraph
5 Policies
2 Risk
2 SystemConfig
1 SystemHealth
2 Violations
6 VulnMgmt
6 Vulnerabilities

Solution

Use typescript-eslint playground to explore logical expression:

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

  1. Fix errors in non-deprected files that are not in src/Containers folder.
  2. Add configuration object for lint rule with ignores array for table above.
    • Fix half of non-deprected subfolders in 2 contributions of about 20 files each.

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

  • updated lint configuration
  • 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.
    See presence of errors before changes and absence of errors after.

@pedrottimark pedrottimark requested a review from a team as a code owner December 2, 2025 15:26
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 63e3330.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-474-g63e333093a.

@pedrottimark pedrottimark merged commit a20275e into master Dec 3, 2025
87 checks passed
@pedrottimark pedrottimark deleted the ROX-32096-pluginGeneric-no-logical-or-preceding-array-or-object branch December 3, 2025 16:54
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