@guoyunhe/create
v0.3.5
Published
Initialize Node.js projects with Guo Yunhe's dev tools configuration
Maintainers
Readme
create
Initialize Node.js projects with Guo Yunhe's configuration
Usage
npm init @guoyunhe
# or in a specific directory
npm init @guoyunhe my-projectEditorConfig, VS Code, lint-staged, oxfmt, and oxlint are initialized automatically.
Existing Prettier and ESLint dependencies, scripts, configuration files, VS Code
settings/recommendations, and lint-staged commands are removed during setup.
The generated lint:fix script applies Oxlint fixes and, when enabled, Stylelint fixes.
VS Code is configured to apply Oxlint fixes on save, and Stylelint fixes when Stylelint is enabled.
The generated Node.js engine range includes currently supported releases and future major versions.
When prompted, select optional React and jsx-a11y rules and whether to enable Stylelint for CSS.
--yes selects all optional configs and installs dependencies without prompting;
--no-install skips dependency installation.
Sets up EditorConfig (downloaded from GitHub), oxfmt (@guoyunhe/oxfmt-config), oxlint
(oxlint-config-recommended and optional React and jsx-a11y configs), optionally Stylelint
(stylelint-config-standard for CSS), VS Code settings, and husky + lint-staged.
Messages are shown in Chinese when LANG starts with zh, otherwise English.
使用
npm init @guoyunhe使用常用开发工具配置初始化项目:EditorConfig、oxfmt、oxlint(oxlint-config-recommended,可选 React 和 jsx-a11y 配置)、VS Code、husky 与 lint-staged。
初始化时会清理 package.json 中的 Prettier/ESLint 依赖、脚本和配置、VS Code 设置/扩展推荐、lint-staged 命令及项目根目录配置文件,并改用 Oxlint。
生成的 lint:fix 脚本会应用 Oxlint 修复;启用 Stylelint 时也会应用 Stylelint 修复。
VS Code 会在保存时自动应用 Oxlint 修复;启用 Stylelint 后也会应用其修复。
生成的 Node.js engines 范围包含当前受支持版本和未来的主版本。
Stylelint(CSS 的 stylelint-config-standard)可选择启用。
可在交互界面多选 React 和 jsx-a11y 规则,并选择是否启用 Stylelint;--yes 会启用所有可选规则并直接安装依赖,--no-install 跳过依赖安装。
