We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
npm init -y를 통해 package.json 생성
npm init -y
npm i -D react react-dom @types/react @types/react-dom
"peerDependencies": { "react": "*", "react-dom": "*" }
npm i -D typescript
{ "include": ["src"], "exclude": [ "dist", "node_modules" ], "compilerOptions": { "module": "esnext", "lib": ["dom", "esnext"], "importHelpers": true, "declaration": true, "sourceMap": true, "rootDir": "./src", "outDir": "./dist/esm", "strict": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "noUnusedLocals": true, "noUnusedParameters": true, "moduleResolution": "node", "jsx": "react", "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, } }
npm i -D @babel/core @babel/preset-react @babel/preset-typescript
// .babelrc.js module.exports = { "presets": ["@babel/preset-react", "@babel/preset-typescript"], }
npm i -D eslint eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-airbnb
// .eslintrc.js module.exports = { root: true, extends: [ 'airbnb', 'eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', ], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint', 'react', 'react-hooks'], rules: { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'react/jsx-filename-extension': [ 2, { extensions: ['.js', '.jsx', '.ts', '.tsx'], }, ], '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-explicit-any': 'off', 'import/extensions': 'off', 'import/order': [ 'error', { groups: ['external', 'sibling'], pathGroups: [ { pattern: 'react', group: 'external', position: 'before', }, ], pathGroupsExcludedImportTypes: ['react'], alphabetize: { order: 'asc', caseInsensitive: true, }, 'newlines-between': 'always', }, ], }, settings: { 'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'], }, 'import/resolver': { node: { extensions: ['.js', '.ts', '.jsx', '.tsx', '.json'], }, }, 'import/extensions': ['.js', '.ts', '.mjs', '.jsx', '.tsx'], }, env: { browser: true, node: true, }, globals: { JSX: true, }, };
.eslintignore
node_modules dist
npm i -D eslint-config-prettier eslint-plugin-prettier prettier
.prettierrc.js
module.exports = { printWidth: 120, tabWidth: 2, singleQuote: true, trailingComma: 'all', semi: true, useTabs: false, endOfLine: 'auto', bracketSpacing: true, bracketLine: true, };
npm i -D rollup rollup-plugin-typescript2 @rollup/plugin-commonjs @rollup/plugin-node-resolve rollup-plugin-peer-deps-external @rollup/plugin-babel @rollup/plugin-image
npx storybook init
The text was updated successfully, but these errors were encountered:
No branches or pull requests
npm init
npm init -y
를 통해 package.json 생성react, react-dom 설치
npm i -D react react-dom @types/react @types/react-dom
typescript 설정
npm i -D typescript
babel 설정
npm i -D @babel/core @babel/preset-react @babel/preset-typescript
eslint 설정
npm i -D eslint eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-airbnb
.eslintignore
생성prettier 설정
npm i -D eslint-config-prettier eslint-plugin-prettier prettier
.prettierrc.js
생성roullup 설정
npm i -D rollup rollup-plugin-typescript2 @rollup/plugin-commonjs @rollup/plugin-node-resolve rollup-plugin-peer-deps-external @rollup/plugin-babel @rollup/plugin-image
storybook 설정
npx storybook init
The text was updated successfully, but these errors were encountered: