Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"eslint": "8.57.1",
"eslint": "10.8.1",
"eslint-config-mitodl": "^2.0.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^4.6.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The project's version of eslint-plugin-react-hooks (4.6.2) is incompatible with the upgrade to ESLint v10, which will break the linting process in CI.
Severity: CRITICAL

Suggested Fix

Upgrade eslint-plugin-react-hooks to a version compatible with ESLint v10, such as 7.0.1 or a later version, to resolve the peer dependency conflict and API incompatibility.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L74

Potential issue: The update to ESLint v10 introduces a compatibility issue with
`eslint-plugin-react-hooks`, which is currently at version `4.6.2`. This version of the
plugin has a peer dependency requirement for ESLint versions up to v8 and is not
compatible with the new plugin loading mechanism and APIs in ESLint v10. As a result,
running linting scripts such as `yarn lint` will cause a runtime error when ESLint
attempts to load the incompatible plugin. This will cause the CI build to fail,
preventing merges.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The lint scripts use the --ext flag, which is no longer supported in the upgraded ESLint v10. This will cause the lint and lint:cache commands to fail.
Severity: CRITICAL

Suggested Fix

Remove the --ext .js,.jsx,.ts,.tsx flag from the lint and lint:cache scripts in package.json. To maintain functionality, migrate the configuration from .eslintrc.js to a new eslint.config.js file and specify the file patterns to be linted within that new configuration file.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L74

Potential issue: The `lint` and `lint:cache` scripts in `package.json` use the `--ext`
flag to specify file extensions. This pull request upgrades ESLint to version 10, which
has completely removed support for the `--ext` flag and the `.eslintrc` configuration
system. Consequently, running `yarn lint` or `yarn lint:cache` will cause an immediate
runtime failure as ESLint v10 will reject the unrecognized command-line option. This
will break the local development linting workflow and any CI/CD pipeline steps that rely
on these scripts.

Expand Down
Loading
Loading