close

jsx-props-no-multi-spaces

Configuration

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

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

Rule Details

Disallow multiple spaces between inline JSX props and blank lines between multiline JSX props.

Examples of incorrect code for this rule:

<Foo  bar="baz" />
<Foo bar="baz"  bam="qux" />

Examples of correct code for this rule:

<Foo bar="baz" />
<Foo bar="baz" bam="qux" />
<Foo
  bar="baz"
  bam="qux"
/>

Original Documentation