Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/rules/split-platform-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,30 @@ export default function Hello() {
return <ActivityIndicatiorIOS/>
}
```

## Rule Options

```js
...
"react-native/split-platform-components": [ <enabled>, {
androidPathRegex: <string>,
iosPathRegex: <string>
}]
...
```

### `androidPathRegex`

A RegExp pattern to use for Android platform components. You can include other custom filenames like so:

```js
'react-native/split-platform-components': [2, {androidPathRegex: '\\.android.(js|jsx|ts|tsx)$'}]
```

### `iosPathRegex`

A RegExp pattern to use for iOS platform components. You can include other custom filenames like so:

```js
'react-native/split-platform-components': [2, {iosPathRegex: '\\.ios.(js|jsx|ts|tsx)$'}]
```