Skip to content

Commit

Permalink
fix(create-rslib): remove unnecessary React import (#607)
Browse files Browse the repository at this point in the history
Co-authored-by: Timeless0911 <50201324+Timeless0911@users.noreply.github.com>
  • Loading branch information
fi3ework and Timeless0911 authored Dec 25, 2024
1 parent c722478 commit fcbdfa5
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
// @ts-ignore ignore remote module type check for passing ci run build because we set @mf-types folder in .gitignore
import { Counter } from 'rslib-module';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import type React from 'react';
import styles from './index.module.scss';

interface CounterButtonProps {
Expand Down
2 changes: 1 addition & 1 deletion examples/react-component-bundle-false/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import type React from 'react';
import { CounterButton } from './components/CounterButton';
import { useCounter } from './useCounter';
import './index.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import type React from 'react';
import styles from './index.module.scss';

interface CounterButtonProps {
Expand Down
2 changes: 1 addition & 1 deletion examples/react-component-bundle/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import type React from 'react';
import { CounterButton } from './components/CounterButton';
import { useCounter } from './useCounter';
import './index.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

export const Button = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [".", "../vitest.setup.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { expect, test } from 'vitest';
import { Button } from '../src/Button';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { expect, test } from 'vitest';
import { Button } from '../src/Button';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [".", "../vitest.setup.ts"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [".", "../vitest.setup.ts"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [".", "../vitest.setup.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

export const Button = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

export const Button = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { expect, test } from 'vitest';
import { Button } from '../src/Button';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { expect, test } from 'vitest';
import { Button } from '../src/Button';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [".", "../vitest.setup.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

export const Button = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

export const Button = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { expect, test } from 'vitest';
import { Button } from '../src/Button';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import './button.css';

interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { expect, test } from 'vitest';
import { Button } from '../src/Button';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [".", "../vitest.setup.ts"]
}

0 comments on commit fcbdfa5

Please sign in to comment.