@solumon/linter
v2.0.0
Published
一个基于 ESLint 9 的通用 JS/TS/Vue 配置(含 Prettier 兼容)
Maintainers
Readme
@solumon/linter
一个基于 ESLint 9 的通用 JS/TS/Vue 配置(含 Prettier 兼容)
特性
- ✅ 基于 ESLint 9 扁平化配置
- ✅ 支持 JavaScript、TypeScript
- ✅ 支持 Vue 2 和 Vue 3
- ✅ 集成 Prettier 格式化
- ✅ 自动检测项目技术栈并应用相应配置
安装
npm install --save-dev @solumon/linter eslint prettier
# 如果使用 TypeScript
npm install --save-dev typescript使用方法
作为 ESLint 配置使用
在你的项目根目录创建 eslint.config.js:
import linter from '@solumon/linter';
export default linter;命令行工具
安装后可以使用 up366-lint 命令:
npx up366-lint支持的配置
- 纯 JavaScript: 自动使用基础配置
- TypeScript: 自动检测并使用 TypeScript 配置
- Vue 2: 自动检测 Vue 2 版本并应用相应配置
- Vue 3: 自动检测 Vue 3 版本并应用相应配置
- Vue + TypeScript: 自动组合 Vue 和 TypeScript 配置
导出
@solumon/linter或@solumon/linter/lint-js- ESLint 配置@solumon/linter/lint-css- CSS 相关配置
要求
- Node.js >= 18.0.0 或 >= 22.12.0
- ESLint >= 9.39.1
- Prettier >= 3.5.3
- TypeScript >= 5.9.3 (可选,仅在使用 TypeScript 时需要)
License
ISC
