Skip to content

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

@divmgl

Description

@divmgl

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

Activity

changed the title [-][Bug]: Cannot ban only explicitSpread[/-] [+][Bug]: Cannot ban only explicitSpread for jsx-props-no-spreading[/+] on Aug 9, 2024
ljharb

ljharb commented on Sep 11, 2024

@ljharb
Member

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

ljharb commented on Sep 11, 2024

@ljharb
Member

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

added a commit that references this issue on Sep 11, 2024
ed64b24

60 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ljharb@divmgl

        Issue actions

          [Bug]: Cannot ban only explicitSpread for jsx-props-no-spreading · Issue #3799 · jsx-eslint/eslint-plugin-react