tuneit-tds v0.3.11
이 프로젝트는 React.js 프로젝트입니다.
시작하기
First, run the development server:
npm run dev
프로젝트 세팅
ESLint, Prettier 설치
# eslint plug-in 과 parser 설치(eslint 가 이미 설치된 상태라면, eslint 제외)
npm install -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser
# Airbnb eslint 설치목록 확인
npm info "eslint-config-airbnb@latest" peerDependencies
# peerDependencies 목록
{
eslint: '^7.32.0 || ^8.2.0',
'eslint-plugin-import': '^2.25.3',
'eslint-plugin-jsx-a11y': '^6.5.1',
'eslint-plugin-react': '^7.28.0',
'eslint-plugin-react-hooks': '^4.3.0'
}
# 위 목록 전부 설치
npm install -D eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks
# airbnb-config 설치
npm install -D eslint-config-airbnb --legacy-peer-deps
# airbnb-config-typescript 설치
npm install -D eslint-config-airbnb-typescript
# Prettier 설치 및 eslint 규칙 충돌 해결
npm install -D prettier eslint-config-prettier eslint-plugin-prettier
eslintrc 설정
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"prettier",
"plugin:prettier/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"import/prefer-default-export": 0,
"import/no-extraneous-dependencies": 0,
"react/react-in-jsx-scope": 0,
"react/prefer-stateless-function": 0,
"react/jsx-filename-extension": 0,
"react/jsx-one-expression-per-line": 0,
"react/jsx-props-no-spreading": 0,
"react/require-default-props": 0,
"no-nested-ternary": 0,
"array-callback-return": 1,
"react/function-component-definition": 0,
"func-style": ["error", "expression"],
"react/no-array-index-key": 1,
"react/no-unstable-nested-components": 1,
"react-hooks/exhaustive-deps": 1,
"jsx-a11y/label-has-associated-control": 1
}
}
prettierrc 설정
{
"parser": "typescript",
"semi": true,
"trailingComma": "all",
"singleQuote": false,
"printWidth": 80,
"useTabs": false,
"tabWidth": 2,
"bracketSpacing": true
}
프로젝트 수정 및 개발 진행 요령
개발 위치 및 사용 파일 생성 요령
- 작업 폴더:
components, data, pages, router
pages
폴더 내부에 작업할 폴더 및index.tsx
생성 (폴더 이름은 컴포넌트 이름)router
-routes
파일에 경로 추가components
폴더에 컴포넌트 개발- 최초 생성한
index.tsx
에 연결 data
폴더에 해당 컴포넌트의컴포넌트.data.ts
파일 생성index.tsx
작성 (기존 작성된 파일의 양식 참고)
개발 참고사항
TDS(Tuneit Design System)
프로젝트에서만 사용하는 일부 컴포넌트는components
-tds
폴더를 참고- layout 컴포넌트 작성 시 파일은
컴포넌트.layout.tsx
로 명명 - data 작성 시 파일은
컴포넌트.data.ts
로 명명 - 컴포넌트 수정 시, 반드시
컴포넌트.data.ts
파일을 수정
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago