resolve duplicate key warnings in SideList and remove unused dispatch parameters #249
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.
Description
This commit addresses multiple issues in the project. In the SideList component, duplicate key warnings were fixed by replacing a hard-coded key with a unique key derived from the array index, ensuring each list item is uniquely identified by React. Unused dispatch parameters were removed from orgActions.js (line 431) and tutorialPageActions.js (line 280), which resolves ESLint no-unused-vars errors. Additionally, the ESLint configuration was migrated from the legacy .eslintrc format to the new flat config system required by ESLint v9. This involved creating an
eslint.config.cjs
file, converting it to use CommonJS syntax (replacing ES module syntax), and removing the unsupported "root" key. These changes improve code quality, resolve build and linting errors, and ensure compatibility with the latest ESLint standards.Related Issue
None
Motivation and Context
The changes were necessary to fix linting and configuration errors that were preventing successful pre-commit checks and code builds. Resolving duplicate key warnings in React and unused variable errors not only cleans up the code but also enhances maintainability. Migrating to the new ESLint flat configuration format ensures future compatibility and adherence to modern development practices.
How Has This Been Tested?
npm run lint
to verify that all ESLint errors are resolved.Screenshots or GIF (In case of UI changes):
N/A
Types of changes
Checklist: