https://github.com/facebook/create-react-app
#프리셋으로 시작
npx create-react-app front --typescript
npm install --save-dev flow-bin
#글로벌
npm install -g eslint
npm install --save-dev eslint
@typescript-eslint/eslint-plugin@latest eslint-plugin-react@latest @typescript-eslint/parser@latest
touch .eslintrc.js
// .eslintrc.js example
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
}
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"react-app",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:react-hooks/recommended",
"eslint:recommended",
"plugin:prettier/recommended",
],
plugins: [
"@typescript-eslint",
"react",
"jsx-a11y",
"import",
"react-hooks",
"prettier",
],
rules: {
"no-unused-vars": "off", // You may want to enable this rule for TypeScript projects
"@typescript-eslint/no-unused-vars": "warn", // You can enable this rule to show warning for unused variables
},
env: {
browser: true, // enables browser global variables
es2021: true, // enables ES12 global variables
},
settings: {
react: {
version: "detect", // detects the installed version of React
},
},
overrides: [
{
files: ["*.jsx", "*.tsx", "*.js"], // Apply the following settings to JSX and TSX files
rules: {
"react/react-in-jsx-scope": "off", // Disable the rule that requires 'React' to be in scope
},
},
],
};
#프리티어 이그노어 파일 만들기