기본 설정
nextjs typescript 설치
yarn create next-app --typescriptmaterial-ui 설치
yarn add @mui/material @emotion/react @emotion/styledserver rendering with nextjs
ESLint + Prettier 설치
ESLint
yarn add --dev @typescript-eslint/eslint-plugin
// .eslintrc.json
{
"plugins": ["@typescript-eslint"],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended"
],
"rules": {
// I suggest you add those two rules:
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error"
}
}Prettier
Husky + Lint-staged 설치
lint-staged
Lint staged
pre-commit hook 설정
Last updated