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

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

    Issue actions