mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Add TypeScript linting (#827)
* add tslint, create tslint.json ruleset from .eslintrc * remove leftover rules * fix up meta files
This commit is contained in:
committed by
Elliot Lee
parent
19eaedf50d
commit
d3fb4b6260
76
tslint.json
Normal file
76
tslint.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"extends": [
|
||||
"tslint-eslint-rules"
|
||||
],
|
||||
"rules": {
|
||||
"ban": [true, ["alert"]],
|
||||
"no-arg": true,
|
||||
"no-conditional-assignment": true,
|
||||
"no-console": false,
|
||||
"no-constant-condition": true,
|
||||
"no-control-regex": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-case": true,
|
||||
"no-empty": true,
|
||||
"no-empty-character-class": true,
|
||||
"no-eval": true,
|
||||
"no-ex-assign": true,
|
||||
"no-extra-boolean-cast": true,
|
||||
"no-extra-semi": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-inner-declarations": [true, "functions"],
|
||||
"no-invalid-regexp": true,
|
||||
// this rule would cause problems with mocha test cases,
|
||||
"no-invalid-this": false,
|
||||
"no-irregular-whitespace": true,
|
||||
"ter-no-irregular-whitespace": true,
|
||||
"label-position": true,
|
||||
"indent": [true, "spaces", 2],
|
||||
"linebreak-style": [true, "unix"],
|
||||
"no-multi-spaces": true,
|
||||
"no-consecutive-blank-lines": [true, 2],
|
||||
"no-unused-expression": true,
|
||||
"no-construct": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-regex-spaces": true,
|
||||
"no-shadowed-variable": true,
|
||||
"ter-no-sparse-arrays": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-string-throw": true,
|
||||
"no-unexpected-multiline": true,
|
||||
"no-unused-variable": [true, {"ignore-pattern": "^_"}],
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"no-magic-numbers": false,
|
||||
"array-bracket-spacing": [true, "never"],
|
||||
"ter-arrow-body-style": false,
|
||||
"ter-arrow-parens": [true, "as-needed"],
|
||||
"ter-arrow-spacing": true,
|
||||
"block-spacing": true,
|
||||
"brace-style": [true, "1tbs", {"allowSingleLine": true}],
|
||||
"variable-name": false,
|
||||
"trailing-comma": [true, {"multiline": "never", "singleline": "never"}],
|
||||
"cyclomatic-complexity": [false, 11],
|
||||
"curly": [true, "all"],
|
||||
"switch-default": false,
|
||||
"eofline": true,
|
||||
"triple-equals": true,
|
||||
"forin": false,
|
||||
"handle-callback-err": true,
|
||||
"ter-max-len": [true, 80],
|
||||
"new-parens": true,
|
||||
"object-curly-spacing": [true, "never"],
|
||||
"object-literal-shorthand": false,
|
||||
"one-variable-per-declaration": [true, "ignore-for-loop"],
|
||||
"ter-prefer-arrow-callback": false,
|
||||
"prefer-const": true,
|
||||
"object-literal-key-quotes": false,
|
||||
"quotemark": [true, "single"],
|
||||
"radix": true,
|
||||
"semicolon": [true, "never"],
|
||||
"space-in-parens": [true, "never"],
|
||||
"comment-format": [true, "check-space"],
|
||||
"use-isnan": true,
|
||||
"valid-typeof": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user