0.3.11 • Published 5 months ago

tuneit-tds v0.3.11

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

이 프로젝트는 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 파일을 수정
0.3.11

5 months ago

0.3.10

5 months ago

0.3.6

6 months ago

0.3.5

6 months ago

0.3.8

6 months ago

0.3.7

6 months ago

0.3.9

5 months ago

0.2.19

6 months ago

0.2.18

6 months ago

0.2.17

6 months ago

0.2.16

6 months ago

0.2.15

7 months ago

0.3.0

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.3.4

6 months ago

0.3.3

6 months ago

0.2.14

7 months ago

0.2.13

7 months ago

0.2.12

7 months ago

0.2.11

7 months ago

0.2.10

7 months ago

0.2.9

7 months ago

0.2.8

7 months ago

0.2.7

7 months ago

0.2.6

7 months ago

0.2.5

7 months ago

0.2.4

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.12

7 months ago

0.1.11

7 months ago

0.1.10

8 months ago

0.1.9

8 months ago

0.1.8

8 months ago

0.1.7

8 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.1

8 months ago

0.0.2

8 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago