> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# jsx-first-prop-new-line

[Added in v0.3.0](https://github.com/web-infra-dev/rslint/releases/tag/v0.3.0)
## Configuration


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

export default defineConfig([
  reactPlugin.configs.recommended,
  {
    rules: {
      'react/jsx-first-prop-new-line': 'error',
    },
  },
]);
```

## Rule Details

Enforce the position of the first prop in a JSX element. Useful for enforcing consistent formatting of JSX props.

Examples of **incorrect** code with `"multiline-multiprop"` (default):

```jsx
<Hello foo="bar"
  baz="quux"
/>
```

Examples of **correct** code with `"multiline-multiprop"` (default):

```jsx
<Hello foo="bar" baz="quux" />
<Hello
  foo="bar"
  baz="quux"
/>
```

## Options

- `"always"`: First prop must always be on a new line.
- `"never"`: First prop must never be on a new line.
- `"multiline"`: First prop must be on a new line when the JSX tag spans multiple lines.
- `"multiline-multiprop"` (default): First prop must be on a new line when the JSX tag spans multiple lines and has multiple props.
- `"multiprop"`: First prop must be on a new line when the JSX tag has multiple props.

## Original Documentation

- [eslint-plugin-react: jsx-first-prop-new-line](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.37.5/docs/rules/jsx-first-prop-new-line.md)
- [Source code](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.37.5/lib/rules/jsx-first-prop-new-line.js)
