176 строки
6.6 KiB
JSON
176 строки
6.6 KiB
JSON
{
|
|
"extends": ["tslint:all", "tslint-config-prettier"],
|
|
"rulesDirectory": ["dist/src"],
|
|
"rules": {
|
|
// Core rules with custom configurations
|
|
"array-type": [true, "array"],
|
|
"no-console": [true, "debug", "error", "info", "log", "time", "timeEnd", "trace"],
|
|
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
|
|
"triple-equals": [true, "allow-null-check"],
|
|
|
|
// Core rules we plan on enabling
|
|
// See https://github.com/Microsoft/tslint-microsoft-contrib/issues/491
|
|
"deprecation": false,
|
|
"eofline": false,
|
|
"jsdoc-format": false,
|
|
"member-access": false,
|
|
"no-any": false,
|
|
"no-boolean-literal-compare": false,
|
|
"no-inferrable-types": false,
|
|
"no-internal-module": false,
|
|
"no-namespace": false,
|
|
"no-unbound-method": false,
|
|
"no-unsafe-any": false,
|
|
"prefer-for-of": false,
|
|
"prefer-function-over-method": false,
|
|
"restrict-plus-operands": false,
|
|
"strict-boolean-expressions": false,
|
|
"strict-type-predicates": false,
|
|
|
|
// Core rules intentionally disabled
|
|
"arrow-return-shorthand": false,
|
|
"comment-format": false,
|
|
"completed-docs": false,
|
|
"cyclomatic-complexity": false,
|
|
"file-name-casing": false,
|
|
"interface-name": false,
|
|
"max-classes-per-file": false,
|
|
"max-file-line-count": false,
|
|
"member-ordering": false,
|
|
"newline-before-return": false,
|
|
"newline-per-chained-call": false,
|
|
"no-angle-bracket-type-assertion": false,
|
|
"no-magic-numbers": false,
|
|
"no-unnecessary-qualifier": false,
|
|
"no-unused-variable": false,
|
|
"no-use-before-declare": false,
|
|
"interface-over-type-literal": false,
|
|
"object-literal-shorthand": false,
|
|
"object-literal-sort-keys": false,
|
|
"ordered-imports": false,
|
|
"prefer-template": false,
|
|
"typedef": false,
|
|
"typedef-whitespace": false,
|
|
|
|
// tslint-microsoft-contrib rules enabled
|
|
"ban-comma-operator": true,
|
|
"binary-expression-operand-order": false,
|
|
"chai-prefer-contains-to-index-of": true,
|
|
"chai-vague-errors": true,
|
|
"encoding": true,
|
|
"export-name": [true, { "allow": ["^Rule$"] }],
|
|
"function-name": true,
|
|
"import-name": true,
|
|
"informative-docs": true,
|
|
"insecure-random": true,
|
|
"jquery-deferred-must-complete": true,
|
|
"max-func-body-length": true,
|
|
"missing-optional-annotation": true,
|
|
"mocha-avoid-only": true,
|
|
"mocha-no-side-effect-code": true,
|
|
"mocha-unneeded-done": true,
|
|
"no-backbone-get-set-outside-model": true,
|
|
"no-banned-terms": true,
|
|
"no-constant-condition": true,
|
|
"no-control-regex": true,
|
|
"no-cookies": true,
|
|
"no-delete-expression": true,
|
|
"no-disable-auto-sanitization": true,
|
|
"no-document-domain": true,
|
|
"no-document-write": true,
|
|
"no-duplicate-imports": true,
|
|
"no-duplicate-parameter-names": true,
|
|
"no-duplicate-switch-case": true,
|
|
"no-exec-script": true,
|
|
"no-for-in": true,
|
|
"no-function-expression": true,
|
|
"no-http-string": true,
|
|
"no-implicit-dependencies": true,
|
|
"no-inner-html": true,
|
|
"no-invalid-regexp": true,
|
|
"no-jquery-raw-elements": true,
|
|
"no-missing-visibility-modifiers": true,
|
|
"no-multiple-var-decl": true,
|
|
"no-object-literal-type-assertion": true,
|
|
"no-octal-literal": true,
|
|
"no-parameter-reassignment": false,
|
|
"no-redundant-jsdoc": true,
|
|
"no-regex-spaces": true,
|
|
"no-return-await": true,
|
|
"no-single-line-block-comment": true,
|
|
"no-string-based-set-immediate": true,
|
|
"no-string-based-set-interval": true,
|
|
"no-string-based-set-timeout": true,
|
|
"no-submodule-imports": true,
|
|
"no-suspicious-comment": true,
|
|
"no-this-assignment": true,
|
|
"no-typeof-undefined": true,
|
|
"no-unnecessary-class": true,
|
|
"no-unnecessary-field-initialization": true,
|
|
"no-unnecessary-local-variable": true,
|
|
"no-unnecessary-override": true,
|
|
"no-unnecessary-type-assertion": false,
|
|
"no-unsupported-browser-code": true,
|
|
"no-useless-files": true,
|
|
"no-with-statement": true,
|
|
"non-literal-fs-path": true,
|
|
"non-literal-require": true,
|
|
"possible-timing-attack": true,
|
|
"prefer-array-literal": true,
|
|
"prefer-conditional-expression": false,
|
|
"prefer-object-spread": true,
|
|
"prefer-switch": false,
|
|
"prefer-type-cast": true,
|
|
"promise-must-complete": true,
|
|
"react-a11y-accessible-headings": true,
|
|
"react-a11y-anchors": true,
|
|
"react-a11y-aria-unsupported-elements": true,
|
|
"react-a11y-event-has-role": true,
|
|
"react-a11y-iframes": true,
|
|
"react-a11y-image-button-has-alt": true,
|
|
"react-a11y-img-has-alt": true,
|
|
"react-a11y-input-elements": true,
|
|
"react-a11y-lang": true,
|
|
"react-a11y-meta": true,
|
|
"react-a11y-mouse-event-has-key-event": true,
|
|
"react-a11y-no-onchange": true,
|
|
"react-a11y-props": true,
|
|
"react-a11y-proptypes": true,
|
|
"react-a11y-required": true,
|
|
"react-a11y-role-has-required-aria-props": true,
|
|
"react-a11y-role-supports-aria-props": true,
|
|
"react-a11y-role": true,
|
|
"react-a11y-tabindex-no-positive": true,
|
|
"react-a11y-titles": true,
|
|
"react-anchor-blank-noopener": true,
|
|
"react-iframe-missing-sandbox": true,
|
|
"react-no-dangerous-html": true,
|
|
"react-this-binding-issue": true,
|
|
"react-unused-props-and-state": true,
|
|
"switch-final-break": true,
|
|
"type-literal-delimiter": false,
|
|
"underscore-consistent-invocation": true,
|
|
"void-zero": true,
|
|
"use-default-type-parameter": false,
|
|
"use-named-parameter": true,
|
|
"use-simple-attributes": true,
|
|
|
|
// tslint-microsoft-contrib rules disabled
|
|
"missing-jsdoc": false,
|
|
"no-duplicate-case": false,
|
|
"no-empty-interfaces": false,
|
|
"no-empty-line-after-opening-brace": false,
|
|
"no-function-constructor-with-string-args": false,
|
|
"no-increment-decrement": false,
|
|
"no-multiline-string": false,
|
|
"no-relative-imports": false,
|
|
"no-reserved-keywords": false,
|
|
"no-stateless-class": false,
|
|
"no-unexternalized-strings": false,
|
|
"no-unnecessary-bind": false,
|
|
"no-var-self": false,
|
|
"react-tsx-curly-spacing": false,
|
|
"valid-typeof": false
|
|
}
|
|
}
|