eshint规则 中文备注

{
    "ecmaFeatures": {},
    "rules": {
        "no-alert": 0,//禁止使用alert confirm prompt
        "no-array-constructor": 0,//禁止使用数组构造器
        "no-bitwise": 0,//禁止使用按位运算符
        "no-caller": 1,//禁止使用arguments.caller或arguments.callee
        "no-catch-shadow": 0,//禁止catch子句参数与外部作用域变量同名
        "no-class-assign": 0,//禁止给类赋值
        "no-cond-assign": 2,//禁止在条件表达式中使用赋值语句
        "no-console": 2,//禁止在Node环境中使用console
        "no-const-assign": 0,//禁止修改const声明的变量
        "no-constant-condition": 2,//禁止在条件中使用常量表达式 if(true) if(1)
        "no-continue": 0,//禁止使用continue
        "no-control-regex": 2,//禁止在正则表达式中使用控制字符
        "no-debugger": 2,//禁止使用debugger
        "no-delete-var": 2,//不能对var声明的变量使用delete操作符
        "no-div-regex": 0,//不能使用看起来像除法的正则表达式/=foo/
        "no-dupe-keys": 2,//在创建对象字面量时不允许键重复 {a:1,a:1}
        "no-dupe-args": 2,//函数参数不能重复
        "no-duplicate-case": 2,//switch中的case标签不能重复
        "no-else-return": 0,//如果if语句里面有return,后面不能跟else语句
        "no-empty": 2,//块语句中的内容不能为空
        "no-empty-character-class": 2,//正则表达式中的[]内容不能为空
        "no-empty-label": 0,//禁止使用空label
        "no-eq-null": 0,//禁止对null使用==或!=运算符
        "no-eval": 0,//禁止使用eval
        "no-ex-assign": 2,//禁止给catch语句中的异常参数赋值
        "no-extend-native": 0,//禁止扩展native对象
        "no-extra-bind": 0,//禁止不必要的函数绑定
        "no-extra-boolean-cast": 2,//禁止不必要的bool转换
        "no-extra-parens": 0,//禁止非必要的括号
        "no-extra-semi": 2,//禁止多余的冒号
        "no-fallthrough": 2,//禁止switch穿透
        "no-floating-decimal": 0,//禁止省略浮点数中的0  .5  3.
        "no-func-assign": 2,//禁止重复的函数声明
        "no-implicit-coercion": 0,//禁止隐式转换
        "no-implied-eval": 0,//禁止使用隐式eval
        "no-inline-comments": 0,//禁止行内备注
        "no-inner-declarations": [2, "functions"],//禁止在块语句中使用声明(变量或函数)
        "no-invalid-regexp": 2,//禁止无效的正则表达式
        "no-invalid-this": 0,//禁止无效的this,只能用在构造器,类,对象字面量
        "no-irregular-whitespace": 2,//不能有不规则的空格
        "no-iterator": 0,//禁止使用__iterator__ 属性
        "no-label-var": 0,//label名不能与var声明的变量名相同
        "no-labels": 0,//禁止标签声明
        "no-lone-blocks": 0,//禁止不必要的嵌套块
        "no-lonely-if": 0,//禁止else语句内只有if语句
        "no-loop-func": 0,//禁止在循环中使用函数(如果没有引用外部变量不形成闭包就可以)
        "no-mixed-requires": [0, false],//声明时不能混用声明类型
        "no-mixed-spaces-and-tabs": [2, false],//禁止混用tab和空格
        "linebreak-style": [0, "unix"],//换行风格
        "no-multi-spaces": 0,//不能用多余的空格
        "no-multi-str": 0,
        "no-multiple-empty-lines": [0, {"max": 2}],
        "no-native-reassign": 0,//不能重写native对象
        "no-negated-in-lhs": 2,//in 操作符的左边不能有!
        "no-nested-ternary": 0,
        "no-new": 0,
        "no-new-func": 0,
        "no-new-object": 0,
        "no-new-require": 0,
        "no-new-wrappers": 0,
        "no-obj-calls": 2,
        "no-octal": 2,
        "no-octal-escape": 0,
        "no-param-reassign": 0,
        "no-path-concat": 0,
        "no-plusplus": 0,//禁止使用++,--
        "no-process-env": 0,
        "no-process-exit": 0,
        "no-proto": 0,//禁止使用__proto__属性
        "no-redeclare": 2,//禁止重复声明变量
        "no-regex-spaces": 2,
        "no-restricted-modules": 0,
        "no-return-assign": 0,
        "no-script-url": 0,
        "no-self-compare": 0,
        "no-sequences": 0,
        "no-shadow": 0,
        "no-shadow-restricted-names": 0,
        "no-spaced-func": 0,
        "no-sparse-arrays": 2,
        "no-sync": 0,
        "no-ternary": 0,
        "no-trailing-spaces": 0,
        "no-this-before-super": 0,
        "no-throw-literal": 0,
        "no-undef": 2,
        "no-undef-init": 0,
        "no-undefined": 0,
        "no-unexpected-multiline": 0,
        "no-underscore-dangle": 0,
        "no-unneeded-ternary": 0,
        "no-unreachable": 2,
        "no-unused-expressions": 0,
        "no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
        "no-use-before-define": 0,
        "no-useless-call": 0,
        "no-void": 0,
        "no-var": 0,
        "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
        "no-with": 0,

        "array-bracket-spacing": [0, "never"],
        "arrow-parens": 0,
        "arrow-spacing": 0,
        "accessor-pairs": 0,//在对象中使用getter/setter
        "block-scoped-var": 0,//块语句中使用var
        "brace-style": [0, "1tbs"],
        "callback-return": 0,
        "camelcase": 0,
        "comma-dangle": [2, "never"],
        "comma-spacing": 0,
        "comma-style": 0,
        "complexity": [0, 11],
        "computed-property-spacing": [0, "never"],
        "consistent-return": 0,
        "consistent-this": [0, "that"],
        "constructor-super": 0,
        "curly": [0, "all"],//必须使用 if(){} 中的{}
        "default-case": 0,
        "dot-location": 0,
        "dot-notation": [0, { "allowKeywords": true }],
        "eol-last": 0,
        "eqeqeq": 1,//必须使用全等
        "func-names": 0,
        "func-style": [0, "declaration"],
        "generator-star-spacing": 0,
        "guard-for-in": 0,
        "handle-callback-err": 0,
        "id-length": 0,
        "indent": 0,
        "init-declarations": 0,
        "key-spacing": [0, { "beforeColon": false, "afterColon": true }],
        "lines-around-comment": 0,
        "max-depth": [0, 4],
        "max-len": [0, 80, 4],
        "max-nested-callbacks": [0, 2],
        "max-params": [0, 3],//函数最多只能有3个参数
        "max-statements": [0, 10],
        "new-cap": 0,
        "new-parens": 0,
        "newline-after-var": 0,
        "object-curly-spacing": [0, "never"],
        "object-shorthand": 0,
        "one-var": 0,
        "operator-assignment": [0, "always"],
        "operator-linebreak": 0,
        "padded-blocks": 0,
        "prefer-const": 0,
        "prefer-spread": 0,
        "prefer-reflect": 0,
        "quote-props": 0,
        "quotes": [0, "double"],//使用双引号
        "radix": 0,
        "id-match": 0,
        "require-yield": 0,
        "semi": 0,
        "semi-spacing": [0, {"before": false, "after": true}],
        "sort-vars": 0,
        "space-after-keywords": [0, "always"],
        "space-before-blocks": [0, "always"],
        "space-before-function-paren": [0, "always"],
        "space-in-parens": [0, "never"],
        "space-infix-ops": 0,
        "space-return-throw-case": 0,
        "space-unary-ops": [0, { "words": true, "nonwords": false }],
        "spaced-comment": 0,
        "strict": 0,//使用严格模式
        "use-isnan": 2,//禁止比较时使用NaN,只能用isNaN()
        "valid-jsdoc": 0,
        "valid-typeof": 2,//必须使用合法的typeof的值
        "vars-on-top": 0,
        "wrap-iife": 0,
        "wrap-regex": 0,
        "yoda": [0, "never"]
    }
}

to be continue。。。

时间: 2024-08-24 04:55:09

eshint规则 中文备注的相关文章

eslint 规则中文注释

"no-alert": 0,//禁止使用alert confirm prompt "no-array-constructor": 2,//禁止使用数组构造器 "no-bitwise": 0,//禁止使用按位运算符 "no-caller": 1,//禁止使用arguments.caller或arguments.callee "no-catch-shadow": 2,//禁止catch子句参数与外部作用域变量同

Mysql创建数据库的排序规则 中文 选择哪种编码

MYSQL中文编码

Mmseg中文分词算法解析

@author linjiexing 开发中文搜索和中文词库语义自己主动识别的时候,我採用都是基于mmseg中文分词算法开发的Jcseg开源project.使用场景涉及搜索索引创建时的中文分词.新词发现的中文分词.语义词向量空间构建过程的中文分词和文章特征向量提取前的中文分词等,整体使用下来,感觉jcseg是一个非常优秀的开源中文分词工具,并且可配置和开源的情况下,能够满足非常多场景的中文分词逻辑.本文先把jcseg使用到最主要的mmseg算法解析一下. 1. 中文分词算法之争 在分析mmseg

centos 防火墙与其一些规则设置

开头:资料来源网上搜索,整理成自己的笔记形式 一.IPTABLES服务状态的检查: 命令:service iptables status 情形1:防火墙服务已安装,但还未运行 [[email protected] ~]# service iptables status iptables: Firewall is not running. 情形2:如图表示防火墙服务已安装且已开启,但还是未配置状态. 情形3:表示防火墙服务尚未安装 二.IPTABLES服务的安装与开启等维护方式: 安装:(此处以y

Suricata规则配置

Suricata 规则配置 IDS/IPS/WAF IPS.IDS和WAF分别是入侵防御系统和入侵检测系统以及WEB应用防火墙的简称,很多人说这些玩意不就是盒子吗已经过时了,其实不是,SIEM其实是有效的正规的打法,对于内网安全监控室非常必要的东西.之前大家的方式都是摒弃盒子思维,觉得盒子不靠谱防御不了真正的攻击行为.这样的理解难说不是国内众多盒子厂商(本人待过很多)走低价竞争路线的一个恶性的结果.其实在数据驱动安全的几天,盒子的作用绝不是简单的匹配规则阻断攻击这么简单的了,而是成为内网信息收集

OneThink学习笔记02----数据字典(即OneThink项目数据库里的表及其字段)

action 字段 类型 注释 id int(11) unsigned 自增主键 name char(30) 行为唯一标识 title char(80) 行为说明 remark char(140) 行为描述 rule text 行为规则 log text 日志规则 status tinyint(2) 状态(-1:已删除,0:禁用,1:正常) type tinyint(2) unsigned 行为类型 update_time int(11) unsigned 修改时间 action_log 字段

[转] 代码审查工具 StyleCop

“代码审查”或是“代码评审”(Code Review),这是一个流程,当开发人员写好代码后,需要让别人来 review 一下他的代码,这是一种有效发现 BUG 的方法.由此,我们可以审查代码的风格.逻辑.思路……,找出问题,以及改进代码.因为这是代码刚刚出炉的时候,所以,这也是代码重构,代码调整,代码修改的最佳时候.所以,Code Review 是编码实现中最最重要的一个环节. 长时间以来,Code Review 需要有一些有效的工具来支持,这样我们就可以更容易,更有效率地来进行代码审查工作.

Spring容器装饰者模式应用之实现业务类与服务类自由组合的解决方案

在任何一个项目中都不可或缺的存在两种bean,一种是实现系统核心功能的bean,我们称之为业务类,另外一种是与系统核心业务无关但同时又提供十分重要服务bean,我们称之为服务类.业务类的bean根据每个系统自身核心功能的不同可以有任意多个,但是服务类的种类在各个系统之间的差异却并不是很大.在系统中经常用到的服务有以下几种,权限服务,日志服务,缓存服务,事务服务以及预警服务等.在整个系统的不断进化过程中,服务类与业务类的关系也不断的发生着变化,由当初垂直模式变为横切模式,这也是编程思想不断演化过程

DICOM医学图像处理:storescp.exe与storescu.exe源码剖析,学习C-STORE请求

背景: 上一篇专栏博文中针对PACS终端(或设备终端,如CT设备)与RIS系统之间worklist查询进行了介绍,并着重对比分析了DICOM3.0中各部分对DICOM网络通讯服务的定义.此次通过结合早些时间的博文DICOM医学图像处理:基于DCMTK工具包学习和分析worklist,对DCMTK开源库中提供的storescp.exe和storescu.exe工具的源码进行剖析,从底层深入了解C-STORE服务的触发及响应. 分析思路: storescp.exe和storescu.exe分别充当着