Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch eslint-plugin-jsx-expressions to eslint-plugin-react-x #424

Conversation

karlhorky
Copy link
Member

@karlhorky karlhorky commented Sep 9, 2024

Closes #413

Testing:

1.tsx

export default function Example() {
  let num = 0;
  num = 0;
  return <div>{num && <div />}</div>;
}

Command line:

$ pnpm eslint 1.tsx
(node:62645) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
Pages directory cannot be found at /Users/k/p/eslint-config-upleveled/pages or /Users/k/p/eslint-config-upleveled/src/pages. If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.

/Users/k/p/eslint-config-upleveled/1.tsx
  4:16  error  Potential leaked value num that might cause unintentionally rendered values or rendering crashes  react-x/no-leaked-conditional-rendering

✖ 1 problem (1 error, 0 warnings)

Copy link

codesandbox-ci bot commented Sep 9, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: environment +17 2.78 MB rel1cx

View full report↗︎

@karlhorky karlhorky merged commit 2fa534a into main Sep 9, 2024
4 checks passed
@karlhorky karlhorky deleted the switch-from-eslint-plugin-jsx-expressions-to-eslint-react-no-leaked-conditional-rendering branch September 9, 2024 13:54
@karlhorky karlhorky changed the title Switch eslint-plugin-jsx-expressions to @eslint-react Switch eslint-plugin-jsx-expressions to eslint-plugin-react-x Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch from eslint-plugin-jsx-expressions to @eslint-react/no-leaked-conditional-rendering
1 participant