An open API service indexing awesome lists of open source software.

https://github.com/dl0312/usehowler


https://github.com/dl0312/usehowler

Last synced: 15 days ago
JSON representation

Awesome Lists containing this project

README

        

# 🌌 Frontend Boilerplate with React, TypeScript

λ¦¬μ•‘νŠΈ 앱을 μ²˜μŒλΆ€ν„° λ§Œλ“€κΈ° μœ„ν•œ 졜고의 방법!

## πŸ‘€ 라이브러리

| 라이브러리 | 버전 |
| ------------------------ | ---------- |
| react (with 🎣**Hooks**) | **^16.11** |
| react-dom | **^16.11** |
| react-router | **^5.1** |
| react-scripts | **3.3** |
| styled-components | **^4.4** |
| typescript | **3.6** |
| antd | **4.1.5** |

## πŸ”§ μ„€μ • νŒŒμΌλ“€

### πŸ–‹ title

타이틀 μˆ˜μ •μ„ μœ„ν•΄μ„œλŠ” [index.html](/public/index.html)μ—μ„œ ν˜„μž¬ `React-TypeScript-Boilerplate`둜 λ˜μ–΄μžˆλŠ” 뢀뢄듀을 κ³ μ³μ•Όν•©λ‹ˆλ‹€.

```html

```

```html
React-TypeScript-Boilerplate
```

### 🦞 favicon

νŒŒλΉ„μ½˜ μˆ˜μ •μ„ μœ„ν•΄μ„œλŠ” [asset](/public/asset)에 μžˆλŠ” 기쑴의 이미지 νŒŒμΌλ“€μ„ λŒ€μ²΄ν•΄μ•Όν•©λ‹ˆλ‹€. (ν˜„μž¬λŠ” 🦞 이λͺ¨μ§€λ‘œ λ˜μ–΄μžˆμŠ΅λ‹ˆλ‹€.)

[FAVIC-O-MATIC](https://favicomatic.com/)에 μ ‘μ†ν•˜μ—¬ `Every damm size,sir!`λ₯Ό μ„ νƒν•˜κ³  `Upload Your Image` λ²„νŠΌμ„ ν΄λ¦­ν•˜μ—¬ ν•„μš”ν•œ 이미지 파일이 λ“€μ–΄μžˆλŠ” μ••μΆ•νŒŒμΌμ„ λ°›μŠ΅λ‹ˆλ‹€.

### πŸ“„ .eslintrc.json

```json
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": ["react", "@typescript-eslint", "prettier"],
"env": {
"browser": true,
"jasmine": true,
"jest": true
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"parser": "@typescript-eslint/parser"
}
```

### πŸ“„ tsconfig.json

`tsconfig.json`μ—λŠ” `TypeScript`의 [컴파일러 μ˜΅μ…˜](https://typescript-kr.github.io/pages/compiler-options.html)이 μ •μ˜λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

λ‹€μŒ μ»€λ§¨λ“œλ₯Ό 톡해 κ°€μž₯ 기본적인 `tsconfig.json`λ₯Ό 생성할 수 μžˆμŠ΅λ‹ˆλ‹€.

```shell
$ npx tsc --init
```

ν•΄λ‹Ή ν”„λ‘œμ νŠΈμ—μ„œλŠ” κΈ°λ³Έ μ˜΅μ…˜μ—μ„œ μˆ˜μ •λœ `tsconfig.json`λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.

```json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"noImplicitAny": false,
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": ["src"]
}
```

### πŸ“„ tslint.json

```json
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {},
"rules": {
"quotemark": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-access": false
},
"rulesDirectory": []
}
```

### πŸ“„ .prettierrc

```json
{
"singleQuote": true,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 80,
"arrowParens": "always",
"orderedImports": true
}
```

## Installation

```
$ npm install
```

## Running

```
$ npm run start
```

## Build

```
$ npm run build
```

## Reference

- [CRA(Create React App)에 tslint, eslint, prettier μ μš©ν•˜κΈ°](https://milooy.wordpress.com/2019/09/21/cracreate-react-app%ec%97%90-tslint-eslint-prettier-%ec%a0%81%ec%9a%a9%ed%95%98%ea%b8%b0/comment-page-1/#comment-2044)

# License

MIT