jshint配置 文件说明

{
    "maxerr"        : 99,       // {int} Maximum error before stopping 最大出错数


    // Enforcing
    "bitwise"       : false,     // true: Prohibit bitwise operators (&, |, ^, etc.)  是否允许一元运算符
    "camelcase"     : true,    // true: Identifiers must be in camelCase 变量名必须驼峰形式
    "curly"         : true,     // true: Require {} for every new block or scope 当if、while 后面逻辑不是表达式的时候,必须用 {} 来套住
    "eqeqeq"        : false,     // true: Require triple equals (===) for comparison  一定要强制用 === 比较? 
    "forin"         : true,     // true: Require filtering for..in loops with obj.hasOwnProperty()  forin必须是自身属性
    "freeze"        : true,     // true: prohibits overwriting prototypes of native objects such as Array, Date etc.  修改原生对象会报错
    "immed"         : false,    // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`  自执行匿名函数必须套一对``
    "latedef"       : false,    // true: Require variables/functions to be defined before being used  是否允许函数声明提升
    "newcap"        : true,    // true: Require capitalization of all constructor functions e.g. `new F()`  所有的new操作符声明的对象必须大些开头,他们会被认为是构造函数
    "noarg"         : true,     // true: Prohibit use of `arguments.caller` and `arguments.callee`  禁用caller和callee方法
    "noempty"       : true,     // true: Prohibit use of empty blocks 不能有空块
    "nonbsp"        : true,     // true: Prohibit "non-breaking whitespace" characte
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值