diff --git a/.envrc b/.envrc deleted file mode 100644 index 1abd480..0000000 --- a/.envrc +++ /dev/null @@ -1,3 +0,0 @@ -watch_file nix/devshell.nix - -use flake diff --git a/.gitignore b/.gitignore index 668095b..a547bf3 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,3 @@ dist-ssr *.njsproj *.sln *.sw? - -.direnv diff --git a/README.md b/README.md index 8c2d760..cca8384 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,42 @@ -# React + TypeScript + Vite +# Space Simulator -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +## 前提条件 -Currently, two official plugins are available: +[mise](https://mise.jdx.dev/getting-started.html) をインストールしてください。 -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +```sh +curl https://mise.run | sh -## React Compiler - -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). +echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc # bash +echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc # zsh +echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish # fish +``` -## Expanding the ESLint configuration +設定後、シェルを再起動してください。 -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: +## セットアップ -```js -export default defineConfig([ - globalIgnores(["dist"]), - { - files: ["**/*.{ts,tsx}"], - extends: [ - // Other configs... +```sh +mise trust +mise install # install command line tools +npm install +``` - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, +## 開発 - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ["./tsconfig.node.json", "./tsconfig.app.json"], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]); +```sh +npm run dev ``` -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: +## コマンド集 + +### Mise -```js -// eslint.config.js -import reactX from "eslint-plugin-react-x"; -import reactDom from "eslint-plugin-react-dom"; +```sh +mise use node@25 # add a program with a version +mise install # install all progarms listed in mise.toml with version in mise.lock -export default defineConfig([ - globalIgnores(["dist"]), - { - files: ["**/*.{ts,tsx}"], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs["recommended-typescript"], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ["./tsconfig.node.json", "./tsconfig.app.json"], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]); +# https://mise.jdx.dev/dev-tools/mise-lock.html +mise upgrade # upgrade packages +mise lock # generate lockfile ``` diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 28ab3b0..0000000 --- a/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1768127708, - "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 75e3ca0..0000000 --- a/flake.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - description = "Simple flake with a devshell"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = - { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - devShells.default = import ./nix/devshell.nix { inherit pkgs; }; - formatter = pkgs.nixpkgs-fmt; - }); -} diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..25ef9c9 --- /dev/null +++ b/mise.lock @@ -0,0 +1,8 @@ +[[tools.node]] +version = "25.6.1" +backend = "core:node" +"platforms.linux-arm64" = { checksum = "sha256:90fea701897ecb424aafa2824539476598437ad9f21e649732a85cc2d955d845", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-linux-arm64.tar.gz"} +"platforms.linux-x64" = { checksum = "sha256:3809fdbfd54829bad363b9db8e96ca3600509e2ff20ede74181cfc1ca8451ce3", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-linux-x64.tar.gz"} +"platforms.macos-arm64" = { checksum = "sha256:a80cb252d170a4730f78f5950cf19a46106f156e5886e5c1cc8c5602aea60243", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-darwin-arm64.tar.gz"} +"platforms.macos-x64" = { checksum = "sha256:3b68f847d9d8861c7c8bfef32c540d14f6ca18bfcbf5f6495a595b9529063a9b", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-darwin-x64.tar.gz"} +"platforms.windows-x64" = { checksum = "sha256:0ae2300cdf44c399b5b351edbefb3534d1342a6fabd64302ca8c8e2fb86b0445", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-win-x64.zip"} diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..66d3450 --- /dev/null +++ b/mise.toml @@ -0,0 +1,5 @@ +[tools] +node = "25" + +[settings] +lockfile = true diff --git a/nix/devshell.nix b/nix/devshell.nix deleted file mode 100644 index f37dd41..0000000 --- a/nix/devshell.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs }: -pkgs.mkShell { - packages = with pkgs; [ - nodejs_25 - ]; -}