mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-19 04:07:36 +03:00
124 lines
4.0 KiB
JSON
124 lines
4.0 KiB
JSON
{
|
|
"rulesDirectory": [
|
|
"./node_modules/tslint-microsoft-contrib"
|
|
],
|
|
"rules": {
|
|
// Rules from tslint-microsoft-contrib
|
|
"function-name": [true, {
|
|
"method-regex": "^[a-z]\\w+$",
|
|
"private-method-regex": "^_[a-z]\\w+$",
|
|
"protected-method-regex": "^[a-z_]\\w+$",
|
|
"static-method-regex": "^[a-z]\\w+$",
|
|
"function-regex": "^\\w+$"
|
|
}],
|
|
"no-delete-expression": true,
|
|
"no-document-domain": true,
|
|
"no-disable-auto-sanitization": true,
|
|
"no-exec-script": true,
|
|
"no-function-constructor-with-string-args": true,
|
|
"no-string-based-set-immediate": true,
|
|
"no-string-based-set-interval": true,
|
|
"no-string-based-set-timeout": true,
|
|
"react-no-dangerous-html": true,
|
|
"react-this-binding-issue": [true, { "allow-anonymous-listeners": true }],
|
|
"no-inner-html": true,
|
|
"no-document-write": true,
|
|
|
|
// Rules that are built in to tslint
|
|
"align": [true, "statements"],
|
|
"class-name": true,
|
|
"curly": true,
|
|
"eofline": true,
|
|
"forin": true,
|
|
"indent": [true, "spaces"],
|
|
"interface-name": [true, "never-prefix"],
|
|
"label-position": true,
|
|
"max-line-length": [true, 140],
|
|
"member-access": [true, "no-public"],
|
|
"new-parens": true,
|
|
"no-arg": true,
|
|
"no-console": [true,
|
|
"debug",
|
|
"info",
|
|
"time",
|
|
"timeEnd",
|
|
"trace"
|
|
],
|
|
"no-consecutive-blank-lines": true,
|
|
"no-conditional-assignment": true,
|
|
"no-construct": true,
|
|
"no-debugger": true,
|
|
"no-duplicate-variable": true,
|
|
"no-empty": true,
|
|
"no-duplicate-super": true,
|
|
"no-duplicate-switch-case": true,
|
|
"no-eval": true,
|
|
"no-inferrable-types": true,
|
|
"no-invalid-this": true,
|
|
"no-string-throw": true,
|
|
"no-switch-case-fall-through": true,
|
|
"no-trailing-whitespace": true,
|
|
"no-unused-expression": true,
|
|
"no-var-keyword": true,
|
|
"no-string-literal": true,
|
|
"no-sparse-arrays": true,
|
|
"ban-comma-operator": true,
|
|
"restrict-plus-operands": true,
|
|
"use-isnan": true,
|
|
"linebreak-style": true,
|
|
"comment-format": true,
|
|
"no-boolean-literal-compare": true,
|
|
"no-unnecessary-initializer": true,
|
|
"number-literal-format": true,
|
|
"space-before-function-paren": [true, "never"],
|
|
"trailing-comma": [
|
|
true,
|
|
{
|
|
"multiline": "never",
|
|
"singleline": "never",
|
|
"esSpecCompliant": true
|
|
}
|
|
],
|
|
"arrow-parens": [true, "ban-single-arg-parens"],
|
|
"one-line": [true,
|
|
"check-open-brace",
|
|
"check-catch",
|
|
"check-finally",
|
|
"check-else",
|
|
"check-whitespace"
|
|
],
|
|
"quotemark": [true, "single", "jsx-single"],
|
|
"radix": true,
|
|
"semicolon": true,
|
|
"triple-equals": true,
|
|
"whitespace": [true,
|
|
"check-branch",
|
|
"check-decl",
|
|
"check-operator",
|
|
"check-module",
|
|
"check-separator",
|
|
"check-type",
|
|
"check-rest-spread",
|
|
"check-type-operator",
|
|
"check-preblock"
|
|
],
|
|
"arrow-return-shorthand": true,
|
|
"no-angle-bracket-type-assertion": true,
|
|
"one-variable-per-declaration": true,
|
|
"no-object-literal-type-assertion": true,
|
|
"no-unnecessary-type-assertion": true,
|
|
"no-duplicate-imports": true,
|
|
"import-spacing": true,
|
|
"no-floating-promises": [true],
|
|
"no-void-expression": [true],
|
|
"file-header": [true],
|
|
"ordered-imports": [true,
|
|
{
|
|
"import-sources-order": "case-insensitive",
|
|
"module-source-path": "full",
|
|
"named-imports-order": "case-insensitive"
|
|
}
|
|
]
|
|
}
|
|
}
|