Skip to content

refactor: tweak tsconfig.json and import paths #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"@vitejs/plugin-react": "4.2.1",
"prettier": "3.2.5",
"typescript": "5.4.5",
"vite": "5.2.9",
"vite-tsconfig-paths": "4.3.2"
"vite": "5.2.9"
}
}
7 changes: 2 additions & 5 deletions src/components/FriendRequestForm/FriendRequestForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

import { UserList } from 'src/components/UserList/UserList'
import { UserList } from '../UserList/UserList'
import styles from './FriendRequestForm.module.css'

const FriendRequestForm = () => {
export const FriendRequestForm = () => {
return (
<form className={styles.wrapper}>
<h2 className={styles.header}>友達リクエストの送信先を選択してください</h2>
Expand All @@ -17,5 +16,3 @@ const FriendRequestForm = () => {
</form>
)
}

export { FriendRequestForm }
6 changes: 2 additions & 4 deletions src/components/UserList/UserList.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Data Source
import { users } from '../../data/users'
import { getUsers } from 'src/data/getUsers'
import { getUsers } from '../../data/getUsers'

// CSS Modules
import styles from './UserList.module.css'
// styled-components
import styled from 'styled-components'

const UserList = () => {
export const UserList = () => {
return <>TODO: ユーザーリストの実装</>
}

export { UserList }
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'

import 'ress'

import { FriendRequestForm } from 'src/components/FriendRequestForm/FriendRequestForm'
import { FriendRequestForm } from './components/FriendRequestForm/FriendRequestForm'

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
"isolatedModules": true,
"jsx": "react-jsx",
"allowSyntheticDefaultImports": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"src/*": ["./src/*"],
}
"noFallthroughCasesInSwitch": true
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx"]
Expand Down
4 changes: 1 addition & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import react from '@vitejs/plugin-react'


export default defineConfig({
plugins: [react(), tsconfigPaths()],
plugins: [react()],
})