Skip to content

Commit 529aa29

Browse files
fix(sonar): wildcard imports should not be used
1 parent c026e82 commit 529aa29

File tree

26 files changed

+31
-31
lines changed

26 files changed

+31
-31
lines changed

.vscode/project.code-snippets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"Component": {
2626
"prefix": "comp",
2727
"body": [
28-
"import * as React from 'react';",
28+
"import React from 'react';",
2929
"",
3030
"import { Text, View } from '@/ui';",
3131
"",

docs/src/content/docs/ui-and-theme/components.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ We also provide an `EmptyList` component that you can use to display a message w
5656
**Use Case**
5757

5858
```tsx
59-
import * as React from 'react';
59+
import React from 'react';
6060
import { List, EmptyList, Text } from '@/ui';
6161

6262
const MyComponent = () => {
@@ -85,7 +85,7 @@ The `cssInterop` function from `nativewind` is used to apply styling and, in thi
8585
**Use Case**
8686

8787
```tsx
88-
import * as React from 'react';
88+
import React from 'react';
8989
import { Image } from '@/ui';
9090

9191
const MyComponent = () => {
@@ -119,7 +119,7 @@ You can also use the `t` snippet to create a simple Text with a default `classNa
119119
**Use Case**
120120

121121
```tsx
122-
import * as React from 'react';
122+
import React from 'react';
123123
import { Text, View } from 'react-native';
124124

125125
const MyComponent = () => {
@@ -183,7 +183,7 @@ Read more about Handling Forms [here](../forms/).
183183
**Use Case**
184184

185185
```tsx
186-
import * as React from 'react';
186+
import React from 'react';
187187
import { Input, View } from '@/ui';
188188

189189
const MyComponent = () => {
@@ -214,7 +214,7 @@ Based on your needs, you can use the `Modal` if you don't have a fixed height fo
214214
**Use Case**
215215

216216
```tsx
217-
import * as React from 'react';
217+
import React from 'react';
218218
import { Modal, useModal, View, Button, Text } from '@/ui';
219219

220220
const MyComponent = () => {
@@ -256,7 +256,7 @@ Feel free to update the component implementation to fit your need and as you kee
256256
**Use Case**
257257

258258
```tsx
259-
import * as React from 'react';
259+
import React from 'react';
260260

261261
import type { Option } from '@/ui';
262262
import { SelectInput, View } from '@/ui';

src/api/common/api-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useReactQueryDevTools } from '@dev-plugins/react-query';
22
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
3-
import * as React from 'react';
3+
import React from 'react';
44

55
export const queryClient = new QueryClient();
66

src/app/(app)/style.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import React from 'react';
22

33
import { Buttons } from '@/components/buttons';
44
import { Colors } from '@/components/colors';

src/app/feed/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Stack, useLocalSearchParams } from 'expo-router';
2-
import * as React from 'react';
2+
import React from 'react';
33

44
import { usePost } from '@/api';
55
import { ActivityIndicator, FocusAwareStatusBar, Text, View } from '@/ui';

src/app/feed/add-post.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { zodResolver } from '@hookform/resolvers/zod';
22
import { Stack } from 'expo-router';
3-
import * as React from 'react';
3+
import React from 'react';
44
import { useForm } from 'react-hook-form';
55
import { showMessage } from 'react-native-flash-message';
66
import { z } from 'zod';

src/components/cover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable max-lines-per-function */
2-
import * as React from 'react';
2+
import React from 'react';
33
import type { SvgProps } from 'react-native-svg';
44
import Svg, { Circle, Path, Polygon } from 'react-native-svg';
55
// TODO: should be updated to simple images

src/components/settings/item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import React from 'react';
22

33
import type { TxKeyPath } from '@/core';
44
import { Pressable, Text, View } from '@/ui';

src/components/settings/language-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import React from 'react';
22

33
import { useSelectedLanguage } from '@/core';
44
import { translate } from '@/core';

src/components/title.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import React from 'react';
22

33
import { Text, View } from '@/ui';
44

0 commit comments

Comments
 (0)