close

jsx-props-no-spread-multi

Configuration

rslint.config.ts
import { defineConfig, reactPlugin } from '@rslint/core';

export default defineConfig([
  reactPlugin.configs.recommended,
  {
    rules: {
      'react/jsx-props-no-spread-multi': 'error',
    },
  },
]);

Rule Details

Disallow spreading the same JSX props identifier multiple times in one element.

Examples of incorrect code for this rule:

<App {...props} myAttr="1" {...props} />

Examples of correct code for this rule:

<App myAttr="1" {...props} />
<App {...props} myAttr="1" />

Options

This rule has no options.

Original Documentation