| Filename | Latest commit message | Latest commit date |
|---|---|---|
The server was invoked as: `server/build/index.js --command comm --args arg1 arg2 arg3` (`arg1 arg2 arg3` is a string in ARGV; the single value of `--args`.) `util:parseArgs()` cannot handle an argument value with a leading dash with this usage. e.g., `server/build/index.js --command npm --args --silent --prefix path/to/servers/src/everything run start` The above will throw, and indicate correct usage: ``` TypeError [ERR_PARSE_ARGS_INVALID_OPTION_VALUE]: Option '--args' argument is ambiguous. Did you forget to specify the option argument for '--args'? To specify an option argument starting with a dash use '--args=-XYZ'. ``` However, since users do not control the invocation of the server, they cannot adjust the notation for their use-case. `arguments`, and `command`, are unknown user input, so adjust the argument form to the more lenient and robust notation. Although a `command` beginning with `-` seems unlikely, consistent handling of both improves code clarity and simplicity. Running the server directly (e.g., on the command line in development) may continue to use: `--args arg1 arg2 arg3` if desired, so this is a non-breaking change. |
||
| .. | ||
| bin | ||
| e2e | ||
| public | ||
| src | ||
| .gitignore | ||
| components.json | ||
| eslint.config.js | ||
| index.html | ||
| jest.config.cjs | ||
| package.json | ||
| playwright.config.ts | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| tsconfig.app.json | ||
| tsconfig.jest.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
tsconfigRootDir: import.meta.dirname,
},
},
});
- Replace
tseslint.configs.recommendedtotseslint.configs.recommendedTypeCheckedortseslint.configs.strictTypeChecked - Optionally add
...tseslint.configs.stylisticTypeChecked - Install eslint-plugin-react and update the config:
// eslint.config.js
import react from "eslint-plugin-react";
export default tseslint.config({
// Set the react version
settings: { react: { version: "18.3" } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
},
});