https://github.com/fjc0k/haoma
使用 EditorConfig + ESLint + Prettier,助你写出漂亮的前端代码。
https://github.com/fjc0k/haoma
editorconfig eslint prettier
Last synced: 8 months ago
JSON representation
使用 EditorConfig + ESLint + Prettier,助你写出漂亮的前端代码。
- Host: GitHub
- URL: https://github.com/fjc0k/haoma
- Owner: fjc0k
- License: mit
- Created: 2020-04-04T22:57:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-20T06:39:42.000Z (9 months ago)
- Last Synced: 2025-03-16T00:03:54.682Z (8 months ago)
- Topics: editorconfig, eslint, prettier
- Language: JavaScript
- Homepage:
- Size: 888 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 好码
使用 **[EditorConfig](https://editorconfig.org/)** + **[ESLint](https://eslint.org/)** + **[Prettier](https://prettier.io/)**,助你写出漂亮的前端代码。
## 安装
```bash
# npm
npm i haoma -D
# or pnpm
# 必须启用 shamefully-hoist 配置
# https://pnpm.js.org/en/npmrc#shamefully-hoist
pnpm add haoma -D
# or yarn
yarn add haoma -D
```
## 使用
使用以下命令初始化 `.gitignore`、 `.gitattributes`、`.editorconfig`、`.eslintrc.js`、`.eslintignore`、`.prettierrc.js`、`.prettierignore`、`tsconfig.json` 配置文件并安装 `haoma`、`typescript`、`eslint`、`prettier`、`husky`、`lint-staged` 依赖:
```bash
# npm
npx haoma init
# or pnpm
pnpx haoma init
# or yarn
yarn haoma init
```
## 限制
`compile` browser 时对 ts 的 `constructor(private x: xxx)` 不支持,原因未知。
## 许可
Jay Fong (c) MIT