xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

ESLint & husky & git commit limit

ESLint & husky & git commit limit

2 == error

.eslintrc

{
  "extends": "eslint-config-umi",
  "rules": {
    "no-console": 2, //0,1,2
    "no-debugger": 0,
    "no-unused-vars": 2,
    "quotes": 0,
    "semi": 2,
    "eqeqeq": 0,
    "no-fallthrough": 0,

    // 'prefer-arrow-callback': 2,
    // 'arrow-spacing': 2,

    // 'react/prefer-es6-class': 2,
    "react/prefer-stateless-function": 2,
    "react/jsx-pascal-case": 2,
    "no-multi-spaces": 2,
    "react/jsx-tag-spacing": 2,
    "react/jsx-curly-spacing": 2,
    "react/jsx-boolean-value": 2, //
    "react/jsx-wrap-multilines": 2 // 将多行的JSX标签写在 ()里

    // 'react/jsx-filename-extension': [1, { extensions: ['.js'] }],
    // 'react/jsx-wrap-multilines': 0,
    // 'react/prop-types': 0,
    // 'react/forbid-prop-types': 0,
    // 'react/jsx-one-expression-per-line': 0,
    // 'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }],
    // 'import/no-extraneous-dependencies': [2, { optionalDependencies: true }],
    // 'jsx-a11y/no-noninteractive-element-interactions': 0,
    // 'jsx-a11y/click-events-have-key-events': 0,
    // 'jsx-a11y/no-static-element-interactions': 0,
    // 'jsx-a11y/anchor-is-valid': 0
    // "no-return-assign": 0,
  }
}

husky 沙哑的

https://www.npmjs.com/package/husky

Husky 工作原理是什么? 自动读取 eslint 的配置文件,作为自己的配置文件?

https://github.com/typicode/husky

Husky

哈士奇

.huskyrc.json

git hook

Husky 工作原理

https://zhuanlan.zhihu.com/p/35913229

ESLint, 0, 1, 2

https://eslint.org/docs/user-guide/getting-started

https://www.cnblogs.com/xgqfrms/p/11064277.html

refs



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


posted @   xgqfrms  阅读(194)  评论(8编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-10-10 markman & psd
2018-10-10 Node.js & Koa.js All In One
2018-10-10 mongodb & vue & node.js
2016-10-10 pure CSS3 实现三角形 icon的方法 All In One
2015-10-10 如何Excel表中显示正确格式的身份证号码
2015-10-10 D3.js Data-Driven Documents Sequences sunburst (Data Visualization Projects)
2015-10-10 D3.js Data-Driven Documents
点击右上角即可分享
微信分享提示