UNPKG

lizi-wxapp-cli

Version:

微信小程序快速创建cli脚手架

110 lines (109 loc) 3.13 kB
{ "extends": "tslint-config-alloy", "rules": { // 禁止给类的构造函数的参数添加修饰符 "no-parameter-properties": false, // 必须使用 === 或 !==,禁止使用 == 或 !=,与 null 比较时除外 "triple-equals": false, // 禁止使用 debugger "no-debugger": false, // 变量必须先定义后使用 "no-use-before-declare": true, // 禁止使用 var "no-var-keyword": true, // 禁止行尾有空格 "no-trailing-whitespace": false, "arrow-parens": false, // 指定类成员的排序规则 "member-ordering": false, "member-access": false, "no-invalid-this": false, "no-unused-expression": false, "no-non-null-assertion": false, "linebreak-style": false, "prefer-for-of": false, "class-name": false, "no-import-side-effect": false, "no-implicit-dependencies": false, "no-magic-numbers": false, "tslint-config-alloy": false, "no-inferrable-types": [ false, "ignore-params", "ignore-properties" ], // 禁止将 this 赋值给其他变量,除非是解构赋值 "no-this-assignment": [ true, { "allowed-names": [ "^self$", "^that$" ], "allow-destructuring": true } ], // 必须使用箭头函数,除非是单独的函数声明或是命名函数 "only-arrow-functions": [ false, "allow-declarations", "allow-named-functions" ], // 禁止出现空代码块,允许 catch 是空代码块 "no-empty": [ false, "allow-empty-catch" ], // 禁止无用的类型断言 "no-unnecessary-type-assertion": false, // 禁止使用 new 来生成 String, Number 或 Boolean "no-construct": true, // 使用 return; 而不是 return undefined; "return-undefined": false, // if 后面必须有 {,除非是单行 if "curly": [ true, "ignore-same-line" ], // 禁止对 array 使用 for in 循环 "no-for-in-array": false, "comment-format": [ true, "check-space" ], // 单行注释格式化规则 // 禁止在 switch 语句中出现重复测试表达式的 case "no-duplicate-switch-case": true, // 禁止出现重复的变量定义或函数参数名 "no-duplicate-variable": [ true, "check-parameters" ], // 禁止出现重复的 import "no-duplicate-imports": true, // import 语句中,关键字之间的间距必须是一个空格 "import-spacing": true, // 必须使用单引号,jsx 中必须使用双引号 "quotemark": [ true, "single", "jsx-double", "avoid-template", "avoid-escape" ], // 行尾必须有分号 "semicolon": [ false, "always", "ignore-interfaces" ], // 括号内首尾禁止有空格 "space-within-parens": [ true, 0 ] }, "rulesDirectory": [ "node_modules/tslint-eslint-rules/dist/rules" ] }