fuge-standard

0.2.0 • Public • Published

Fuge Standard

用于复歌科技的JavaScript样式校验工具。在Standard的基础上,做了如下修改:

  • 引号使用双引号而不是单引号(quotes
  • 数组,对象等如果跨行,末尾一定要有逗号comma-dangle
  • 函数名和函数参数之间不需要空格,除了asyncArrow
// bad style
function a () {...}
var a = function () {...}
var b = async() => {...}
// good style
function a() {...}
var a = function() {...}
var b = async () => {...}
  • 关键词前后都需要添加空格,除了if后不需要添加空格。
// bad style
if (...) {...}
if() {
    ...
} else{...}
if() {
 
}else {...}
// good style
if() {...}
if() {
 
} else {...}

Package Sidebar

Install

npm i fuge-standard

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • fate-lovely