@nexhome/standard

0.2.1 • Public • Published

@nexhome/standard

简介

这是一个用于NEXHome项目的前端标准配置与脚本的集合库,包含了ESlint规则配置、Prettier规则配置、git commit校验脚本。

引用Eslint配置需在 .eslintrc.js 添加如下代码。

module.exports = {
  extends: [require.resolve('@nexhome/standard/lib/eslint-config/vue')],
};

引用Prettier配置需在 .prettierrc.js 添加如下代码。

const prettierConfig = require('@nexhome/standard/lib/prettier');
module.exports = prettierConfig;

引用git提交描述检查需安装 @nexhome/yorkie 并在对应git-hoooks中添加执行指令如:

"gitHooks": {
    "pre-commit": "yarn prettier && yarn lint",
    "commit-msg": "node node_modules/@nexhome/standard/lib/git-hooks/verify-commit-msg.js"
  }

Package Sidebar

Install

npm i @nexhome/standard

Weekly Downloads

0

Version

0.2.1

License

ISC

Unpacked Size

10.6 kB

Total Files

9

Last publish

Collaborators

  • guygubaby
  • greyowl