Repository navigation
NXT-10859: Fix lint errors for latest Enact CLI (ESLint 10) - #269
Merged
Merged
Conversation
The latest Enact CLI (develop) uses eslint-config-enact on ESLint 10,
which changed several rules and caused the samples lint stage to fail:
- Replace removed 'react/jsx-no-bind' with 'enact/jsx-no-bind' in all
eslint-disable directives
- Drop 'react/no-unescaped-entities' from disable directives (rule no
longer active)
- Remove useless assignments flagged by new 'no-useless-assignment'
rule (newDataOrder in virtualgridlist-api stores, lastPath in
dynamic-panel FileBrowsers)
- Preserve caught error via { cause } to satisfy 'preserve-caught-error'
in feature-custom-skin-generator
- Suppress 'react-hooks/set-state-in-effect' on intentional sample
effect in virtualgridlist-incremental-load
Verified locally with Node 24 and @enact/cli linked from develop:
'npm run lint' is All clean and sandstone/all-samples packs successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Issue Resolved / Feature Added
The latest Enact CLI (develop) uses eslint-config-enact on ESLint 10, which changed several rules and caused the samples lint stage to fail across multiple sample apps.
Resolution
Updated the sample sources to comply with the ESLint 10 rule set used by the latest Enact CLI:
react/jsx-no-bindrule withenact/jsx-no-bindineslint-disabledirectivesreact/no-unescaped-entitiesfrom disable directives (rule no longer active)no-useless-assignmentrule (newDataOrderin virtualgridlist-api stores,lastPathin dynamic-panel FileBrowsers){ cause }to satisfypreserve-caught-errorin feature-custom-skin-generatorreact-hooks/set-state-in-effecton the intentional sample effect in virtualgridlist-incremental-loadAdditional Considerations
Verified locally with Node 24 and
@enact/clilinked fromdevelop:npm run lintreports "All clean" andsandstone/all-samplespacks successfully.Links
NXT-10859
Comments
Enact-DCO-1.0-Signed-off-by: Taeyoung Hong (taeyoung.hong@lge.com)