{"id":21189624,"url":"https://github.com/sky0621/react-v18-with-fake-api","last_synced_at":"2026-04-09T17:56:40.600Z","repository":{"id":38074505,"uuid":"481635089","full_name":"sky0621/react-v18-with-fake-api","owner":"sky0621","description":"React v18 勉強用プロジェクト","archived":false,"fork":false,"pushed_at":"2024-12-09T06:50:56.000Z","size":1133,"stargazers_count":1,"open_issues_count":18,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T13:27:26.633Z","etag":null,"topics":["emotion","eslint","jest","ky","material-ui-react","prettier","react","react-hook-form","react-query","recoil","scaffdog","tslint","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sky0621.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-14T14:26:43.000Z","updated_at":"2023-01-31T19:44:58.000Z","dependencies_parsed_at":"2023-09-27T03:24:38.536Z","dependency_job_id":"3a4561a5-947a-4347-b97c-c3570305af91","html_url":"https://github.com/sky0621/react-v18-with-fake-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Freact-v18-with-fake-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Freact-v18-with-fake-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Freact-v18-with-fake-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky0621%2Freact-v18-with-fake-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sky0621","download_url":"https://codeload.github.com/sky0621/react-v18-with-fake-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243646521,"owners_count":20324582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emotion","eslint","jest","ky","material-ui-react","prettier","react","react-hook-form","react-query","recoil","scaffdog","tslint","typescript"],"created_at":"2024-11-20T18:53:08.154Z","updated_at":"2025-12-30T22:34:18.619Z","avatar_url":"https://github.com/sky0621.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-v18-with-fake-api\n\n## setup\n\n### typesync\n\nhttps://www.npmjs.com/package/typesync\n\n```\n$ yarn add -D typesync\n```\n\n```\n$ cat package.json\n{\n　　・・・\n  \"scripts\": {\n　　　　・・・\n    \"preinstall\": \"typesync || :\"\n  },\n　　・・・\n```\n\n### eslint\n\n```\n$ yarn list eslint\nyarn list v1.22.10\nwarning Filtering by arguments is deprecated. Please use the pattern option instead.\n└─ eslint@8.12.0\nDone in 0.91s.\n```\n\n```\n$ yarn upgrade-interactive --latest\n　　・・・\n\n$ yarn upgrade typescript@latest\n　　・・・\n```\n\n```\n$ yarn eslint --init\nyarn run v1.22.10\n$ /home/sky0621/work/src/github.com/sky0621/cv/admin/frontend/node_modules/.bin/eslint --init\nYou can also run this command directly using 'npm init @eslint/config'.\nNeed to install the following packages:\n  @eslint/create-config\nOk to proceed? (y) y\n✔ How would you like to use ESLint? · style\n✔ What type of modules does your project use? · esm\n✔ Which framework does your project use? · react\n✔ Does your project use TypeScript? · No / Yes\n✔ Where does your code run? · browser\n✔ How would you like to define a style for your project? · guide\n✔ Which style guide do you want to follow? · airbnb\n✔ What format do you want your config file to be in? · JavaScript\nChecking peerDependencies of eslint-config-airbnb@latest\nLocal ESLint installation not found.\nThe config that you've selected requires the following dependencies:\n\neslint-plugin-react@^7.28.0 @typescript-eslint/eslint-plugin@latest eslint-config-airbnb@latest eslint@^7.32.0 || ^8.2.0 eslint-plugin-import@^2.25.3 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-react-hooks@^4.3.0 @typescript-eslint/parser@latest\n✔ Would you like to install them now with npm? · No / Yes\nA config file was generated, but the config file itself may not follow your linting rules.\nSuccessfully created .eslintrc.js file in /home/sky0621/work/src/github.com/sky0621/cv/admin/frontend\nDone in 75.90s.\n```\n\nTo check syntax, find problems, and enforce code style\nJavaScript modules (import/export)\nReact\nYes\nBrowser\nUse a popular style guide\nAirbnb: https://github.com/airbnb/javascript\nJavaScript\nNo\n\nhttps://eslint.org/docs/user-guide/configuring/\n\n```\n$ yarn add -D eslint-plugin-react @typescript-eslint/eslint-plugin \\\neslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y \\\neslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/parser\n```\n\n```\n$ yarn preinstall\n\n$ yarn\n```\n\n### Prettier\n\n```\n$ yarn add -D prettier eslint-config-prettier\n```\n\n#### check\n\n```\n$ npx eslint-config-prettier 'src/**/*.{js,jsx,ts,tsx}'\nNo rules that are unnecessary or conflict with Prettier were found.\n```\n\n### stylelint\n\n```\n$ yarn add -D stylelint stylelint-config-standard stylelint-order stylelint-config-recess-order\n\n$ yarn \n```\n\n### more\n\n```\n$ yarn -D add eslint-plugin-prefer-arrow\n```\n\n### react-router:v6\n\nhttps://reactrouter.com/\n\n```\n$ yarn add react-router-dom@6\n```\n\n### redux\n\nhttps://redux.js.org/\n\n```\n$ yarn add redux react-redux\n```\n\n### react-hooks-form\n\n```\n$ yarn add react-hook-form\n```\n\n## tips\n\n### React\n\n### TypeScript\n\n#### typeof\n\n変数の型を取得。\n\n```\ntype Person = {\n  name: string;\n  old: number;\n};\n\nconst person: Person = {\n  name: 'yamada',\n  old: 22,\n};\n\nconsole.log(typeof ''); // string\nconsole.log(typeof person); // object\n```\n\n#### keyof\n\n型コンテキストで利用すると、オブジェクトのプロパティ名を抽出して、文字列リテラルのユニオン型を取得。\n\n```\ntype Person = {\n  name: string;\n  old: number;\n};\n\ntype Keys = keyof Person; // \"name\" | \"old\"\n\nlet keys: Keys;\nkeys = 'name'; // OK\nkeys = 'old'; // OK\nkeys = 'xxx'; // Error: Type '\"xxx\"' is not assignable to type '\"name\" | \"old\"'.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky0621%2Freact-v18-with-fake-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsky0621%2Freact-v18-with-fake-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky0621%2Freact-v18-with-fake-api/lists"}