0.0.8 • Published 2 years ago

@fengyinchao/eslint-plugin-custom v0.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

eslint-plugin-custom

这是一个自定义规则的 ESLint Plugin,用于规范业务代码,当前支持规则有:

  • style-generate RN中辅助生成 styles.xxx
  • scrollview-flatlist-sectionlist-use-scrollIndicatorInsets RN 中的组件 scrollview flatlist sectionlist 需要显示使用 scrollIndicatorInsets 属性以规避 ios12 上的问题
  • file-header-annotation 文件头必须要有注释
  • no-first rxjs 中不允许使用 no-first
  • no-useless-optional-chain ngrx reducer 中创建 selector 时不要冗余使用可选链特性
  • normal-timer electron 渲染进程中使用 setTimeout/setInterval 要加 window, 以区分 nodejs
  • use-onpush Angular 组件请使用 onpush 而非 default
  • extract-log-url Angular 组件中打日志时 clog 参数请使用枚举,支持将 clog 参数自动提取生成枚举文件

Installation

$ npm install @fengyinchao/eslint-plugin-custom --save-dev

Usage

Add @fengyinchao/custom to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["@fengyinchao/custom"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "@fengyinchao/custom/rule-name": 2
  }
}
0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago