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

[Bug]: Cannot ban only explicitSpread for jsx-props-no-spreading #3799

Closed
2 tasks done
divmgl opened this issue Aug 9, 2024 · 2 comments
Closed
2 tasks done

[Bug]: Cannot ban only explicitSpread for jsx-props-no-spreading #3799

divmgl opened this issue Aug 9, 2024 · 2 comments
Labels

Comments

@divmgl
Copy link

divmgl commented Aug 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

This rule:

"react/jsx-props-no-spreading": [
  "error",
  {
    html: "ignore",
    custom: "ignore",
    explicitSpread: "enforce",
  },
],

Results in this crash:

ESLint: 8.57.0

Error: .eslintrc.cjs:
        Configuration for rule "react/jsx-props-no-spreading" is invalid:
        Value {"html":"ignore","custom":"ignore","explicitSpread":"enforce"} should NOT be valid.

Reproduction:

https://stackblitz.com/edit/vitejs-vite-dyngku?file=eslint.config.js

Run pnpm lint.

Expected Behavior

Does not crash.

eslint-plugin-react version

^7.35.0

eslint version

^9.8.0

node version

v18.20.3

@divmgl divmgl added the bug label Aug 9, 2024
@divmgl divmgl changed the title [Bug]: Cannot ban only explicitSpread [Bug]: Cannot ban only explicitSpread for jsx-props-no-spreading Aug 9, 2024
@ljharb
Copy link
Member

ljharb commented Sep 11, 2024

Looks like the schema wasn't changed in #2449, but I can't believe that zero people have tried to use the option in the last 5 years. cc @pawelnvk

@ljharb
Copy link
Member

ljharb commented Sep 11, 2024

ah, maybe this is a new warning in eslint 9, and that's why nobody noticed.

@ljharb ljharb closed this as completed in ed64b24 Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants