# stdlint **Repository Path**: pandorping/stdlint ## Basic Information - **Project Name**: stdlint - **Description**: stdlint - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-30 - **Last Updated**: 2026-04-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # web-code-lint 一站式代码规范工具,一键集成: - ESLint 9(flat config)+ Vue + TypeScript - Prettier - Stylelint - Husky + lint-staged + Commitlint - VSCode 保存自动格式化 ## 环境要求 - **Node.js ≥ 20.19**(初始化目标项目时会安装 Stylelint 17 与 `@stylistic/stylelint-config@5`,与 Node 20 要求一致。) ## 安装 ```bash pnpm add -g web-code-lint # 或 npm install -g web-code-lint ``` ## 在项目中初始化 在目标项目根目录执行: ```bash web-code-lint init ``` 会根据当前目录下的锁文件自动选用 **pnpm / yarn / npm** 安装开发依赖,并生成配置与 Git hooks。Hooks 内使用 `npx --no-install`,与包管理器无关。 初始化后安装依赖以启用 Husky: ```bash pnpm install # 或 yarn / npm install ``` ## 常用命令 由 `init` 写入目标项目的 `package.json`: - `lint`:ESLint + Prettier + Stylelint 检查 - `lint:fix`:同上并尽量自动修复 ## VSCode 建议安装 **ESLint**、**Stylelint**、**Prettier** 扩展;工作区已启用 `eslint.useFlatConfig` 以配合 `eslint.config.mjs`。