haoma

使用 EditorConfig + ESLint + Prettier,助你写出漂亮的前端代码。

Usage no npm install needed!

<script type="module">
  import haoma from 'https://cdn.skypack.dev/haoma';
</script>

README

好码

使用 EditorConfig + ESLint + Prettier,助你写出漂亮的前端代码。

安装

# 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.prettierignoretsconfig.json 配置文件并安装 haomatypescripteslintprettierhuskylint-staged 依赖:

# 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