Update eslint to v9.x and other dependencies#578
Update eslint to v9.x and other dependencies#578celdrake wants to merge 3 commits intoflightctl:mainfrom
Conversation
WalkthroughDeleted legacy Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // eslint-disable-next-line no-restricted-imports | ||
| import { DescriptionList, DescriptionListProps } from '@patternfly/react-core'; | ||
|
|
||
| // Wrapper that adds the PF4 class for description lists as their styles are not loaded in the Console |
There was a problem hiding this comment.
The PF4 class is no longer relevant.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
libs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsx (1)
33-35: Consider logging the actual error for debugging.While the bare
catchis valid (the user-facing message intentionally usesrsIdfor context), the actual error from the API call is now completely discarded. This could make debugging production issues harder.💡 Optional: Log the error for debugging
- } catch { + } catch (e) { + // eslint-disable-next-line no-console + console.error('Failed to fetch resource sync:', e); setError(t('Resource sync {{rsId}} could not be found', { rsId })); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsx` around lines 33 - 35, The catch block in ResourceSyncToRepository.tsx swallows the API error; update the bare catch to capture the error (e.g., catch (err)) and log it for debugging before calling setError — include contextual info like rsId in the log. Keep the user-facing setError(t(...)) as-is but add a console.error or project logger call (e.g., console.error or logger.error) referencing the caught error and rsId so failures in the API call are recorded.eslint.config.js (1)
22-35: Consider usingprojectServiceinstead ofproject: truefor better performance and scalability in typescript-eslint v8.The first config object applies
@typescript-eslint/parserwithparserOptions.project: trueto all source files being linted. While this works, typescript-eslint v8 recommends migrating toprojectService: true, which automatically detects the nearest tsconfig per file and requires less setup. When upgrading, pair it withtsconfigRootDir: import.meta.dirnamefor correct path resolution. The second config object (lines 129-146) only modifies rules and does not change the parser setup, so it does not affect this scope.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` around lines 22 - 35, Replace parserOptions.project: true inside the languageOptions block with projectService: true and add tsconfigRootDir using import.meta.dirname to ensure correct tsconfig resolution; specifically modify the languageOptions object that sets parser: tsParser and parserOptions to remove project: true, add projectService: true, and set tsconfigRootDir: import.meta.dirname so typescript-eslint v8 will auto-detect per-file tsconfig files and improve performance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/standalone/package.json`:
- Around line 23-25: The dependency entry for copy-webpack-plugin in
package.json is pointing to a non-existent version (^14.0.0); update the
"copy-webpack-plugin" dependency string to a valid published version (for
example "9.1.0" or a compatible range like "^9.1.0") so npm/yarn can install it;
locate the "copy-webpack-plugin" key in apps/standalone/package.json and replace
the version value, then run install to verify resolution.
In `@eslint.config.js`:
- Around line 73-89: The replacement messages are inconsistent and missing
slashes: update the '@patternfly/react-icons' messages to use
'dist/js/icons/<icon>' (add the '/' before the placeholder) and update the
'@patternfly/react-tokens' group message to match the tokens path rule by
pointing to 'dist/js/<token>' instead of 'dist/js/icons<icon>'; ensure both the
group entries (group: ['@patternfly/react-icons/dist/esm**'] and group:
['@patternfly/react-tokens/dist/esm**']) and the paths entries (name:
'@patternfly/react-icons' and name: '@patternfly/react-tokens') use the
corrected, consistent strings with the '/' separators and the correct token vs
icon placeholders.
In `@libs/ui-components/src/components/Catalog/CatalogPage.tsx`:
- Around line 239-243: The filter predicate uses incorrect operator precedence:
change the comparison in the setCatalogs call inside CatalogPage so the
empty-string fallback applies to item.id rather than the entire boolean
expression; e.g., use c !== (item.id || '') or compute const id = item.id || ''
and then call catalogFilter.setCatalogs((catalogs) => catalogs.filter((c) => c
!== id)); update the matching add branch to use the same id variable (item.id ||
'') so both branches are consistent (references: catalogFilter.setCatalogs,
catalogFilter.catalogs, item.id).
In `@libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx`:
- Around line 124-126: The catch block currently turns off the feature by
calling setArtifactsEnabled(false) for any exception; change it so generic
fetch/parse errors are not treated as "feature disabled": remove the
unconditional setArtifactsEnabled(false) from the catch, and either rethrow the
caught error or set a distinct load-error state (e.g., setArtifactsLoadError) so
callers can handle API failures; only call setArtifactsEnabled(false) when you
can deterministically detect the feature is disabled (e.g., based on a specific
response flag or a 4xx/feature-disabled status). Ensure you update the catch in
the same async function/useEffect where setArtifactsEnabled is used and keep the
symbol names (setArtifactsEnabled, and the async loader function) to locate the
change.
---
Nitpick comments:
In `@eslint.config.js`:
- Around line 22-35: Replace parserOptions.project: true inside the
languageOptions block with projectService: true and add tsconfigRootDir using
import.meta.dirname to ensure correct tsconfig resolution; specifically modify
the languageOptions object that sets parser: tsParser and parserOptions to
remove project: true, add projectService: true, and set tsconfigRootDir:
import.meta.dirname so typescript-eslint v8 will auto-detect per-file tsconfig
files and improve performance.
In `@libs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsx`:
- Around line 33-35: The catch block in ResourceSyncToRepository.tsx swallows
the API error; update the bare catch to capture the error (e.g., catch (err))
and log it for debugging before calling setError — include contextual info like
rsId in the log. Keep the user-facing setError(t(...)) as-is but add a
console.error or project logger call (e.g., console.error or logger.error)
referencing the caught error and rsId so failures in the API call are recorded.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b64152d4-ef30-47a8-9c5e-f796f4df5f69
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (38)
.eslintrc.jsapps/ocp-plugin/package.jsonapps/standalone/package.jsonapps/standalone/src/app/components/AppLayout/AppLayout.tsxapps/standalone/src/app/components/Login/LoginPage.tsxapps/standalone/src/app/context/AuthContext.tsapps/standalone/src/app/utils/apiCalls.tseslint.config.jslibs/ui-components/src/components/Catalog/CatalogPage.tsxlibs/ui-components/src/components/Catalog/DeprecateModal.tsxlibs/ui-components/src/components/Catalog/EditWizard/EditAppWizard.tsxlibs/ui-components/src/components/Catalog/InstallWizard/InstallAppWizard.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsxlibs/ui-components/src/components/Device/DevicesPage/DeviceToolbarFilters.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsxlibs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsxlibs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsxlibs/ui-components/src/components/Fleet/CreateFleet/steps/ReviewStep.tsxlibs/ui-components/src/components/Fleet/FleetDetails/FleetDetailsContent.tsxlibs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.tsxlibs/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsTab.tsxlibs/ui-components/src/components/Login/TokenLoginForm.tsxlibs/ui-components/src/components/Masthead/CommandLineToolsPage.tsxlibs/ui-components/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsxlibs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsxlibs/ui-components/src/components/Terminal/Terminal.tsxlibs/ui-components/src/components/common/FlightCtlDescriptionList.tsxlibs/ui-components/src/components/common/OrganizationSelector.tsxlibs/ui-components/src/components/form/NameField.tsxlibs/ui-components/src/components/form/RichValidationTextField.tsxlibs/ui-components/src/components/form/validations.tslibs/ui-components/src/components/modals/LoginCommandModal/LoginCommandModal.tsxlibs/ui-components/src/components/modals/massModals/ResumeDevicesModal/MassResumeDevicesModal.tsxlibs/ui-components/src/hooks/useDeviceSpecSystemInfo.tsxlibs/ui-components/src/utils/apiCalls.tspackage.json
💤 Files with no reviewable changes (2)
- libs/ui-components/src/components/common/FlightCtlDescriptionList.tsx
- .eslintrc.js
9c94140 to
daa9764
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
eslint.config.js (2)
84-85:⚠️ Potential issue | 🟡 MinorFix the icon path placeholder.
Missing
/separator before<icon>.Suggested fix
{ name: '@patternfly/react-icons', - message: 'Import using full path `@patternfly/react-icons/dist/js/icons<icon>` instead', + message: 'Import using full path `@patternfly/react-icons/dist/js/icons/<icon>` instead', },,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` around lines 84 - 85, Update the message string for the '@patternfly/react-icons' rule in eslint.config.js to include the missing '/' before the <icon> placeholder (change "...dist/js/icons<icon>..." to "...dist/js/icons/<icon>...") so the suggested import path is correct.
73-78:⚠️ Potential issue | 🟡 MinorFix the replacement-path messages.
The message on line 78 for
@patternfly/react-tokensincorrectly referencesicons<icon>instead of<token>. Additionally, lines 74 and 85 are missing the/separator before the placeholder.Suggested fix
{ group: ['@patternfly/react-icons/dist/esm**'], - message: 'Import using the full js path `@patternfly/react-icons/dist/js/icons<icon>` instead', + message: 'Import using the full js path `@patternfly/react-icons/dist/js/icons/<icon>` instead', }, { group: ['@patternfly/react-tokens/dist/esm**'], - message: 'Import using the full js path `@patternfly/react-tokens/dist/js/icons<icon>` instead', + message: 'Import using the full js path `@patternfly/react-tokens/dist/js/<token>` instead', },,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` around lines 73 - 78, Update the replacement messages in eslint.config.js for the PatternFly rules: in the rule object using group ['@patternfly/react-icons/dist/esm**'] change the message path to include a slash before the placeholder (use `@patternfly/react-icons/dist/js/icons/<icon>`), and in the rule object using group ['@patternfly/react-tokens/dist/esm**'] change both the path to include the slash and the placeholder name to `<token>` (use `@patternfly/react-tokens/dist/js/tokens/<token>`); locate these messages by their group values and update the message strings accordingly.
🧹 Nitpick comments (2)
eslint.config.js (2)
119-122: Remove rules for plugins that aren't loaded.These rules reference
prettierandimportplugins that aren't included in this configuration. ESLint will either warn about unknown rules or silently ignore them.Suggested fix
'@typescript-eslint/interface-name-prefix': 'off', - 'prettier/prettier': 'off', - 'import/no-unresolved': 'off', - 'import/extensions': 'off', 'no-console': 'error',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` around lines 119 - 122, The config currently lists rules 'prettier/prettier', 'import/no-unresolved', and 'import/extensions' but the corresponding plugins aren't loaded; remove those rule entries from the rules object in eslint.config.js (or alternatively install and add the 'prettier' and 'import' plugins to the configuration) so ESLint no longer references unknown rules; specifically update the rules block that contains '@typescript-eslint/interface-name-prefix', 'prettier/prettier', 'import/no-unresolved', 'import/extensions' by deleting the unused 'prettier/...' and 'import/...' lines or by adding the plugins to the top-level plugins array and configuring them.
119-119: Remove non-existent rule reference.The rule
@typescript-eslint/interface-name-prefixwas removed in@typescript-eslintv3.0.0 (May 2020). Since this config uses v8.57.1, this rule no longer exists and should be removed.Suggested fix
- '@typescript-eslint/interface-name-prefix': 'off',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` at line 119, Remove the obsolete ESLint rule reference '@typescript-eslint/interface-name-prefix' from the ESLint configuration (the string '@typescript-eslint/interface-name-prefix' in the rules block) because it was removed in `@typescript-eslint` v3+; simply delete that entry from the rules object so the config only contains valid/available rule names for the current `@typescript-eslint` version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@eslint.config.js`:
- Around line 43-47: Update the ESLint extends entry that uses the old config
name: replace the string
'plugin:`@typescript-eslint/recommended-requiring-type-checking`' inside the
extends call (the compat.extends invocation) with the new name
'plugin:`@typescript-eslint/recommended-type-checked`' so the extends array in
eslint.config.js uses the v8-compatible config.
---
Duplicate comments:
In `@eslint.config.js`:
- Around line 84-85: Update the message string for the '@patternfly/react-icons'
rule in eslint.config.js to include the missing '/' before the <icon>
placeholder (change "...dist/js/icons<icon>..." to "...dist/js/icons/<icon>...")
so the suggested import path is correct.
- Around line 73-78: Update the replacement messages in eslint.config.js for the
PatternFly rules: in the rule object using group
['@patternfly/react-icons/dist/esm**'] change the message path to include a
slash before the placeholder (use
`@patternfly/react-icons/dist/js/icons/<icon>`), and in the rule object using
group ['@patternfly/react-tokens/dist/esm**'] change both the path to include
the slash and the placeholder name to `<token>` (use
`@patternfly/react-tokens/dist/js/tokens/<token>`); locate these messages by
their group values and update the message strings accordingly.
---
Nitpick comments:
In `@eslint.config.js`:
- Around line 119-122: The config currently lists rules 'prettier/prettier',
'import/no-unresolved', and 'import/extensions' but the corresponding plugins
aren't loaded; remove those rule entries from the rules object in
eslint.config.js (or alternatively install and add the 'prettier' and 'import'
plugins to the configuration) so ESLint no longer references unknown rules;
specifically update the rules block that contains
'@typescript-eslint/interface-name-prefix', 'prettier/prettier',
'import/no-unresolved', 'import/extensions' by deleting the unused
'prettier/...' and 'import/...' lines or by adding the plugins to the top-level
plugins array and configuring them.
- Line 119: Remove the obsolete ESLint rule reference
'@typescript-eslint/interface-name-prefix' from the ESLint configuration (the
string '@typescript-eslint/interface-name-prefix' in the rules block) because it
was removed in `@typescript-eslint` v3+; simply delete that entry from the rules
object so the config only contains valid/available rule names for the current
`@typescript-eslint` version.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 776a6fd1-5ee8-4d9b-b1a2-3c19cd55728d
📒 Files selected for processing (34)
apps/standalone/src/app/components/AppLayout/AppLayout.tsxapps/standalone/src/app/components/Login/LoginPage.tsxapps/standalone/src/app/context/AuthContext.tsapps/standalone/src/app/utils/apiCalls.tseslint.config.jslibs/ui-components/src/components/Catalog/CatalogPage.tsxlibs/ui-components/src/components/Catalog/DeprecateModal.tsxlibs/ui-components/src/components/Catalog/EditWizard/EditAppWizard.tsxlibs/ui-components/src/components/Catalog/InstallWizard/InstallAppWizard.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsxlibs/ui-components/src/components/Device/DevicesPage/DeviceToolbarFilters.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsxlibs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsxlibs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsxlibs/ui-components/src/components/Fleet/CreateFleet/steps/ReviewStep.tsxlibs/ui-components/src/components/Fleet/FleetDetails/FleetDetailsContent.tsxlibs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.tsxlibs/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsTab.tsxlibs/ui-components/src/components/Login/TokenLoginForm.tsxlibs/ui-components/src/components/Masthead/CommandLineToolsPage.tsxlibs/ui-components/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsxlibs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsxlibs/ui-components/src/components/Terminal/Terminal.tsxlibs/ui-components/src/components/common/FlightCtlDescriptionList.tsxlibs/ui-components/src/components/common/OrganizationSelector.tsxlibs/ui-components/src/components/form/NameField.tsxlibs/ui-components/src/components/form/RichValidationTextField.tsxlibs/ui-components/src/components/form/validations.tslibs/ui-components/src/components/modals/LoginCommandModal/LoginCommandModal.tsxlibs/ui-components/src/components/modals/massModals/ResumeDevicesModal/MassResumeDevicesModal.tsxlibs/ui-components/src/hooks/useDeviceSpecSystemInfo.tsxlibs/ui-components/src/utils/apiCalls.ts
💤 Files with no reviewable changes (1)
- libs/ui-components/src/components/common/FlightCtlDescriptionList.tsx
🚧 Files skipped from review as they are similar to previous changes (15)
- libs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsx
- libs/ui-components/src/components/Catalog/EditWizard/EditAppWizard.tsx
- libs/ui-components/src/components/Login/TokenLoginForm.tsx
- libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.tsx
- libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsx
- libs/ui-components/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsx
- libs/ui-components/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx
- libs/ui-components/src/components/Catalog/CatalogPage.tsx
- libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx
- libs/ui-components/src/hooks/useDeviceSpecSystemInfo.tsx
- libs/ui-components/src/components/form/validations.ts
- apps/standalone/src/app/components/AppLayout/AppLayout.tsx
- libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx
- libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx
- libs/ui-components/src/components/Catalog/DeprecateModal.tsx
There was a problem hiding this comment.
♻️ Duplicate comments (2)
libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx (1)
124-126:⚠️ Potential issue | 🟠 MajorDo not treat generic load failures as “artifacts feature disabled.”
At Line 124 and Line 125, the catch path still sets
hasArtifactsEnabledtofalsefor any exception, which conflates transient fetch/parse failures with the explicit 501 disabled-feature case already handled above.Proposed fix
- } catch { - setArtifactsEnabled(false); + } catch (error) { + setLoadError(getErrorMessage(error)); } finally { setLoading(false); }Based on learnings: In the flightctl-ui codebase, error handling for API calls follows a React pattern where the caller component implements try-catch blocks and manages error states.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx` around lines 124 - 126, The catch block that currently calls setArtifactsEnabled(false) conflates transient fetch/parse errors with the explicit 501 "feature disabled" case; change the catch to stop mutating hasArtifactsEnabled via setArtifactsEnabled and instead handle errors by setting a local error/loading state or rethrowing so the caller can manage it—keep the existing explicit branch that sets setArtifactsEnabled(false) when the API returns 501, but remove the generic setArtifactsEnabled(false) from the catch around the fetch/parse logic (references: setArtifactsEnabled and hasArtifactsEnabled).eslint.config.js (1)
73-89:⚠️ Potential issue | 🟡 MinorFix PatternFly replacement-path messages for consistency and correctness.
The messages still mix token/icon placeholders and miss the
/before<icon>in icon paths, which can mislead imports.Suggested message fixes
- message: 'Import using the full js path `@patternfly/react-icons/dist/js/icons<icon>` instead', + message: 'Import using the full js path `@patternfly/react-icons/dist/js/icons/<icon>` instead', }, { group: ['@patternfly/react-tokens/dist/esm**'], - message: 'Import using the full js path `@patternfly/react-tokens/dist/js/icons<icon>` instead', + message: 'Import using the full js path `@patternfly/react-tokens/dist/js/<token>` instead', }, @@ - message: 'Import using full path `@patternfly/react-icons/dist/js/icons<icon>` instead', + message: 'Import using full path `@patternfly/react-icons/dist/js/icons/<icon>` instead', },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` around lines 73 - 89, Update the PatternFly replacement-path messages so they are consistent and correct: change every icon message to include the missing "/" before "<icon>" and use the same phrasing for icons vs tokens; specifically update the group message for '@patternfly/react-icons/dist/esm**' and the paths.name messages for '@patternfly/react-icons' to "Import using the full js path `@patternfly/react-icons/dist/js/icons/<icon>` instead", and update the group message for '@patternfly/react-tokens/dist/esm**' and the paths.name message for '@patternfly/react-tokens' to "Import using the full js path `@patternfly/react-tokens/dist/js/<token>` instead" so icons and tokens use consistent wording and placeholders.
🧹 Nitpick comments (1)
eslint.config.js (1)
27-35: Consider scoping type-aware parsing to TypeScript files only to reduce lint overhead.Line 34 applies
project: trueglobally across all files with no file-type matcher. While the tsconfig files are configured to support JS files (most haveallowJs: true), type-aware parsing on plain JS files (e.g.,libs/i18n/i18next-parser.config.js, mock files) may be unnecessary overhead. Consider creating a separate config object targeting only.tsand.tsxfiles withproject: trueand limiting the global parser config to basic linting.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.js` around lines 27 - 35, The global parserOptions currently sets project: true under parserOptions (affecting all files); change to scope type-aware parsing to TypeScript only by removing project: true from the global parserOptions and adding a separate config object (or override) that targets .ts and .tsx files and sets parserOptions.project: true; keep the global parserOptions (and ecmaFeatures.jsx) lightweight for JS files to reduce lint overhead and reference the parserOptions block and any overrides in eslint.config.js when making this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@eslint.config.js`:
- Around line 73-89: Update the PatternFly replacement-path messages so they are
consistent and correct: change every icon message to include the missing "/"
before "<icon>" and use the same phrasing for icons vs tokens; specifically
update the group message for '@patternfly/react-icons/dist/esm**' and the
paths.name messages for '@patternfly/react-icons' to "Import using the full js
path `@patternfly/react-icons/dist/js/icons/<icon>` instead", and update the
group message for '@patternfly/react-tokens/dist/esm**' and the paths.name
message for '@patternfly/react-tokens' to "Import using the full js path
`@patternfly/react-tokens/dist/js/<token>` instead" so icons and tokens use
consistent wording and placeholders.
In `@libs/ui-components/src/components/Masthead/CommandLineToolsPage.tsx`:
- Around line 124-126: The catch block that currently calls
setArtifactsEnabled(false) conflates transient fetch/parse errors with the
explicit 501 "feature disabled" case; change the catch to stop mutating
hasArtifactsEnabled via setArtifactsEnabled and instead handle errors by setting
a local error/loading state or rethrowing so the caller can manage it—keep the
existing explicit branch that sets setArtifactsEnabled(false) when the API
returns 501, but remove the generic setArtifactsEnabled(false) from the catch
around the fetch/parse logic (references: setArtifactsEnabled and
hasArtifactsEnabled).
---
Nitpick comments:
In `@eslint.config.js`:
- Around line 27-35: The global parserOptions currently sets project: true under
parserOptions (affecting all files); change to scope type-aware parsing to
TypeScript only by removing project: true from the global parserOptions and
adding a separate config object (or override) that targets .ts and .tsx files
and sets parserOptions.project: true; keep the global parserOptions (and
ecmaFeatures.jsx) lightweight for JS files to reduce lint overhead and reference
the parserOptions block and any overrides in eslint.config.js when making this
change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4d7df738-ba89-4b0a-a768-d909fb6985f4
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (38)
.eslintrc.jsapps/ocp-plugin/package.jsonapps/standalone/package.jsonapps/standalone/src/app/components/AppLayout/AppLayout.tsxapps/standalone/src/app/components/Login/LoginPage.tsxapps/standalone/src/app/context/AuthContext.tsapps/standalone/src/app/utils/apiCalls.tseslint.config.jslibs/ui-components/src/components/Catalog/CatalogPage.tsxlibs/ui-components/src/components/Catalog/DeprecateModal.tsxlibs/ui-components/src/components/Catalog/EditWizard/EditAppWizard.tsxlibs/ui-components/src/components/Catalog/InstallWizard/InstallAppWizard.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsxlibs/ui-components/src/components/Device/DevicesPage/DeviceToolbarFilters.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsxlibs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsxlibs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsxlibs/ui-components/src/components/Fleet/CreateFleet/steps/ReviewStep.tsxlibs/ui-components/src/components/Fleet/FleetDetails/FleetDetailsContent.tsxlibs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.tsxlibs/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsTab.tsxlibs/ui-components/src/components/Login/TokenLoginForm.tsxlibs/ui-components/src/components/Masthead/CommandLineToolsPage.tsxlibs/ui-components/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsxlibs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsxlibs/ui-components/src/components/Terminal/Terminal.tsxlibs/ui-components/src/components/common/FlightCtlDescriptionList.tsxlibs/ui-components/src/components/common/OrganizationSelector.tsxlibs/ui-components/src/components/form/NameField.tsxlibs/ui-components/src/components/form/RichValidationTextField.tsxlibs/ui-components/src/components/form/validations.tslibs/ui-components/src/components/modals/LoginCommandModal/LoginCommandModal.tsxlibs/ui-components/src/components/modals/massModals/ResumeDevicesModal/MassResumeDevicesModal.tsxlibs/ui-components/src/hooks/useDeviceSpecSystemInfo.tsxlibs/ui-components/src/utils/apiCalls.tspackage.json
💤 Files with no reviewable changes (2)
- libs/ui-components/src/components/common/FlightCtlDescriptionList.tsx
- .eslintrc.js
🚧 Files skipped from review as they are similar to previous changes (24)
- libs/ui-components/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx
- libs/ui-components/src/components/modals/massModals/ResumeDevicesModal/MassResumeDevicesModal.tsx
- libs/ui-components/src/components/Login/TokenLoginForm.tsx
- libs/ui-components/src/components/form/NameField.tsx
- package.json
- libs/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.tsx
- libs/ui-components/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsx
- libs/ui-components/src/components/Catalog/DeprecateModal.tsx
- libs/ui-components/src/components/Catalog/CatalogPage.tsx
- libs/ui-components/src/components/Terminal/Terminal.tsx
- libs/ui-components/src/hooks/useDeviceSpecSystemInfo.tsx
- libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsx
- libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestList.tsx
- libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx
- libs/ui-components/src/components/form/validations.ts
- apps/standalone/src/app/utils/apiCalls.ts
- libs/ui-components/src/components/Catalog/EditWizard/EditAppWizard.tsx
- libs/ui-components/src/components/Catalog/InstallWizard/InstallAppWizard.tsx
- libs/ui-components/src/utils/apiCalls.ts
- apps/standalone/src/app/components/AppLayout/AppLayout.tsx
- libs/ui-components/src/components/modals/LoginCommandModal/LoginCommandModal.tsx
- libs/ui-components/src/components/ResourceSync/ResourceSyncToRepository.tsx
- apps/standalone/package.json
- libs/ui-components/src/components/form/RichValidationTextField.tsx
eslintfrom deprecatedv8.57.1tov9.39.x, and its associated plugins. This activated some new or existing linting rules.serialize-javascriptupdated tov7.0.4to fix https://github.com/flightctl/flightctl-ui/security/dependabot/90svgoupdated tov4.0.1to fix https://github.com/flightctl/flightctl-ui/security/dependabot/91qsupdated tov6.14.2to fix https://github.com/flightctl/flightctl-ui/security/dependabot/77webpackupdated tov5.105.4for the entire project to fix https://github.com/flightctl/flightctl-ui/security/dependabot/20 and the rest of webpack-related issues.Summary by CodeRabbit
Chores
New Features
Refactor