├── test ├── rules │ ├── encoding │ │ ├── utf8.ts.lint │ │ ├── tslint.json │ │ ├── utf16be.ts.lint │ │ ├── utf16le.ts.lint │ │ └── utf8-bom.ts.lint │ ├── eofline │ │ ├── empty.ts.lint │ │ ├── invalid.ts.fix │ │ ├── valid.ts.lint │ │ ├── only-whitespace.ts.fix │ │ ├── tslint.json │ │ ├── only-whitespace.ts.lint │ │ ├── disabled.ts.lint │ │ ├── invalid.ts.lint │ │ ├── whitespace.ts.lint │ │ └── comment.ts.lint │ ├── no-use-before-declare │ │ ├── $.ts │ │ ├── lib.ts │ │ ├── underscore.ts │ │ ├── ImportAliasSecond.ts │ │ ├── InterfaceFile.ts │ │ ├── ImportAliasWithComment.ts │ │ ├── ImportRegularAlias.ts │ │ ├── ImportWithLineBreaks.ts │ │ ├── tslint.json │ │ └── tsconfig.json │ ├── file-name-casing │ │ ├── ignore │ │ │ ├── file.ts.lint │ │ │ ├── complaint.tsx.lint │ │ │ └── tslint.json │ │ ├── camel-case │ │ │ ├── camelCase.ts.lint │ │ │ ├── no-camel-case.ts.lint │ │ │ └── tslint.json │ │ ├── complex │ │ │ ├── ComponentName.tsx.lint │ │ │ ├── nonComponentName.ts.lint │ │ │ ├── my-button.component.ts.lint │ │ │ ├── InvalidNonComponentName.ts.lint │ │ │ ├── invalid-component-name.tsx.lint │ │ │ └── tslint.json │ │ ├── file-matcher │ │ │ ├── camelCase.ts.lint │ │ │ ├── PascalCase.ts.lint │ │ │ ├── notPascalCase.ts.lint │ │ │ ├── not_camel_case.ts.lint │ │ │ └── not_kebab_case.tsx.lint │ │ ├── kebab-case │ │ │ ├── kebab-case.ts.lint │ │ │ ├── noKebabCase.ts.lint │ │ │ └── tslint.json │ │ ├── pascal-case │ │ │ ├── PascalCase.ts.lint │ │ │ ├── no-pascal-case.ts.lint │ │ │ └── tslint.json │ │ ├── snake-case │ │ │ ├── snake_case.ts.lint │ │ │ ├── no-snake-case.ts.lint │ │ │ └── tslint.json │ │ └── invalid-option │ │ │ ├── snake_case.ts.lint │ │ │ └── tslint.json │ ├── linebreak-style │ │ ├── emptyFile │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── failure │ │ │ ├── CRLF │ │ │ │ ├── tslint.json │ │ │ │ └── test.ts.fix │ │ │ └── LF │ │ │ │ ├── tslint.json │ │ │ │ └── test.ts.fix │ │ └── success │ │ │ ├── LF │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ │ └── CRLF │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ ├── use-default-type-parameter │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── _integration │ │ ├── typescript-version │ │ │ ├── correct.ts.fix │ │ │ ├── skip.js.lint │ │ │ ├── skip.ts.lint │ │ │ ├── correct.js.lint │ │ │ ├── correct.ts.lint │ │ │ ├── tslint.json │ │ │ └── substitution.ts.lint │ │ ├── error-format │ │ │ └── tslint.json │ │ ├── react │ │ │ └── invalid.tsx.lint │ │ └── enable-disable │ │ │ └── tslint.json │ ├── no-restricted-globals │ │ ├── foo.d.ts │ │ ├── custom-global.d.ts │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── namespace.ts.lint │ ├── no-unnecessary-qualifier │ │ ├── b.test.ts │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ ├── test-global-2.ts.lint │ │ ├── test-global.ts.fix │ │ └── test-global.ts.lint │ ├── whitespace │ │ ├── all │ │ │ ├── bom.ts.lint │ │ │ └── import.ts.lint │ │ ├── check-separator │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── none │ │ │ └── tslint.json │ │ └── check-postbrace │ │ │ ├── test.ts.fix │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ ├── match-default-export-name │ │ ├── anonymous.test.ts │ │ ├── named.test.ts │ │ ├── tslint.json │ │ ├── tsconfig.json │ │ └── test.ts.lint │ ├── no-namespace │ │ ├── allow-declarations │ │ │ ├── test.d.ts.lint │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ └── default │ │ │ ├── tslint.json │ │ │ └── test.d.ts.lint │ ├── no-unused-variable │ │ ├── ignore-pattern │ │ │ ├── a.test.ts │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── default │ │ │ ├── node_modules │ │ │ │ ├── react.ts │ │ │ │ ├── react │ │ │ │ │ └── addons.ts │ │ │ │ └── a.ts │ │ │ ├── tslint.json │ │ │ ├── tsconfig.json │ │ │ ├── react1.tsx.lint │ │ │ ├── react-addons1.tsx.lint │ │ │ ├── react2.tsx.lint │ │ │ └── react-addons2.tsx.lint │ │ ├── type-checked │ │ │ ├── a.test.ts │ │ │ ├── tslint.json │ │ │ ├── tsconfig.json │ │ │ ├── some.test.ts │ │ │ └── test.ts.lint │ │ └── check-parameters │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── object-literal-sort-keys │ │ ├── match-declaration-order │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── match-declaration-order-only │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── crlf.ts.lint │ │ ├── ignore-case │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── shorthand-first │ │ │ └── tslint.json │ │ ├── ignore-blank-lines │ │ │ └── tslint.json │ │ └── locale-compare │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ ├── file-header │ │ ├── empty-file │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good-newline │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good │ │ │ ├── tslint.json │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── good-shebang │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── good-single-line │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── good-use-strict │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── bad │ │ │ ├── tslint.json │ │ │ ├── test2.ts.lint │ │ │ ├── test2.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── test.ts.fix │ │ ├── bad-shebang │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── bad-single-line │ │ │ ├── tslint.json │ │ │ ├── test.ts.lint │ │ │ └── test.ts.fix │ │ ├── bad-use-strict │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── good-allow-single-line-comments │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── bad-newline │ │ │ ├── tslint.json │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── bad-single-newline │ │ │ ├── tslint.json │ │ │ ├── test.ts.lint │ │ │ └── test.ts.fix │ ├── no-unnecessary-type-assertion │ │ ├── noStrictNullChecks │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── strict │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── strictNullChecks │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ ├── semicolon │ │ ├── never │ │ │ ├── eof2.ts.lint │ │ │ ├── eof1.ts.lint │ │ │ └── tslint.json │ │ ├── enabled │ │ │ └── tslint.json │ │ ├── always │ │ │ └── tslint.json │ │ ├── ignore-interfaces │ │ │ └── tslint.json │ │ ├── ignore-bound-class-methods │ │ │ └── tslint.json │ │ └── strict-bound-class-methods │ │ │ └── tslint.json │ ├── deprecation │ │ ├── other2.test.ts │ │ ├── tslint.json │ │ └── tsconfig.json │ ├── forin │ │ └── tslint.json │ ├── no-implicit-dependencies │ │ ├── default │ │ │ ├── malformed │ │ │ │ ├── package.json │ │ │ │ └── tets.ts.lint │ │ │ ├── bom │ │ │ │ ├── package.json │ │ │ │ └── test.ts.lint │ │ │ ├── nested-package │ │ │ │ └── package.json │ │ │ ├── tslint.json │ │ │ └── builtin-only.ts.lint │ │ ├── dev │ │ │ └── tslint.json │ │ ├── optional │ │ │ └── tslint.json │ │ ├── whitelist-with-dev │ │ │ └── tslint.json │ │ └── whitelist │ │ │ └── tslint.json │ ├── radix │ │ └── tslint.json │ ├── align │ │ ├── statements │ │ │ ├── bom.ts.fix │ │ │ ├── tslint.json │ │ │ └── bom.ts.lint │ │ ├── members │ │ │ └── tslint.json │ │ ├── arguments │ │ │ └── tslint.json │ │ ├── elements │ │ │ └── tslint.json │ │ └── parameters │ │ │ └── tslint.json │ ├── no-arg │ │ └── tslint.json │ ├── no-eval │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── class-name │ │ └── tslint.json │ ├── curly │ │ ├── defaults │ │ │ └── tslint.json │ │ ├── as-needed │ │ │ └── tslint.json │ │ └── ignore-same-line │ │ │ └── tslint.json │ ├── new-parens │ │ └── tslint.json │ ├── no-any │ │ ├── default │ │ │ └── tslint.json │ │ └── ignore-rest-args │ │ │ └── tslint.json │ ├── no-bitwise │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── no-for-in │ │ └── tslint.json │ ├── one-line │ │ ├── none │ │ │ └── tslint.json │ │ ├── no-whitespace │ │ │ └── tslint.json │ │ └── all │ │ │ └── tslint.json │ ├── typedef │ │ ├── none │ │ │ └── tslint.json │ │ ├── parameter │ │ │ └── tslint.json │ │ ├── call-signature │ │ │ └── tslint.json │ │ ├── arrow-parameter │ │ │ └── tslint.json │ │ ├── array-destructuring │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── arrow-call-signature │ │ │ └── tslint.json │ │ ├── object-destructuring │ │ │ └── tslint.json │ │ ├── variable-declaration │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── member-variable-declaration │ │ │ └── tslint.json │ │ └── arrow-call-signature-and-parameter │ │ │ └── tslint.json │ ├── use-isnan │ │ └── tslint.json │ ├── no-console │ │ ├── all │ │ │ └── tslint.json │ │ └── list │ │ │ └── tslint.json │ ├── no-construct │ │ └── tslint.json │ ├── no-debugger │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── no-empty │ │ ├── default │ │ │ └── tslint.json │ │ ├── allow-empty-catch │ │ │ └── tslint.json │ │ └── allow-empty-functions │ │ │ └── tslint.json │ ├── no-reference │ │ ├── tslint.json │ │ ├── test.ts.lint │ │ └── ts240.ts.lint │ ├── no-string-throw │ │ └── tslint.json │ ├── prefer-for-of │ │ └── tslint.json │ ├── prefer-while │ │ └── tslint.json │ ├── static-this │ │ └── tslint.json │ ├── label-position │ │ └── tslint.json │ ├── no-for-in-array │ │ ├── tslint.json │ │ └── tsconfig.json │ ├── no-misused-new │ │ └── tslint.json │ ├── no-null-keyword │ │ └── tslint.json │ ├── no-return-await │ │ └── tslint.json │ ├── no-unsafe-any │ │ ├── default │ │ │ ├── commonjsModule.ts │ │ │ ├── tslint.json │ │ │ ├── tsconfig.json │ │ │ └── es6Module.ts │ │ ├── jsx │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── unknown │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ ├── no-var-keyword │ │ ├── tslint.json │ │ └── global.d.ts.lint │ ├── no-var-requires │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── switch-default │ │ └── tslint.json │ ├── typeof-compare │ │ └── tslint.json │ ├── arrow-parens │ │ ├── default │ │ │ └── tslint.json │ │ └── ban-single-arg-parens │ │ │ └── tslint.json │ ├── ban-comma-operator │ │ └── tslint.json │ ├── ban-ts-ignore │ │ └── tslint.json │ ├── callable-types │ │ └── tslint.json │ ├── import-spacing │ │ └── tslint.json │ ├── indent │ │ ├── spaces-2 │ │ │ ├── tslint.json │ │ │ └── test.tsx.lint │ │ ├── spaces-4 │ │ │ └── tslint.json │ │ ├── tabs-2 │ │ │ └── tslint.json │ │ └── tabs-4 │ │ │ └── tslint.json │ ├── interface-name │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── always-prefix │ │ │ └── tslint.json │ │ └── never-prefix │ │ │ └── tslint.json │ ├── invalid-void │ │ ├── default │ │ │ └── tslint.json │ │ └── allow-generics │ │ │ ├── false │ │ │ └── tslint.json │ │ │ ├── true │ │ │ └── tslint.json │ │ │ └── whitelist │ │ │ └── tslint.json │ ├── jsdoc-format │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── jsdoc-bom.ts.lint │ │ └── check-multiline-start │ │ │ └── tslint.json │ ├── member-access │ │ ├── default │ │ │ └── tslint.json │ │ ├── no-public │ │ │ └── tslint.json │ │ ├── accessor │ │ │ └── tslint.json │ │ ├── constructor │ │ └── parameter-property │ │ │ └── tslint.json │ ├── no-default-export │ │ └── tslint.json │ ├── no-duplicate-super │ │ └── tslint.json │ ├── no-dynamic-delete │ │ └── tslint.json │ ├── no-empty-interface │ │ └── tslint.json │ ├── no-internal-module │ │ └── tslint.json │ ├── no-redundant-jsdoc │ │ └── tslint.json │ ├── no-require-imports │ │ └── tslint.json │ ├── no-sparse-arrays │ │ └── tslint.json │ ├── no-string-literal │ │ └── tslint.json │ ├── prefer-const │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── ambient.d.ts.lint │ │ └── destructuring-all │ │ │ └── tslint.json │ ├── prefer-switch │ │ ├── default │ │ │ └── tslint.json │ │ └── min-cases-2 │ │ │ └── tslint.json │ ├── prefer-template │ │ ├── default │ │ │ └── tslint.json │ │ └── allow-single-concat │ │ │ └── tslint.json │ ├── quotemark │ │ ├── invalid-double │ │ │ ├── test.ts.fix │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── invalid-single │ │ │ ├── test.ts.fix │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── backtick │ │ │ └── tslint.json │ │ ├── double │ │ │ └── tslint.json │ │ ├── single │ │ │ ├── tslint.json │ │ │ ├── test.tsx.lint │ │ │ └── test.ts.fix │ │ ├── jsx-double │ │ │ ├── tslint.json │ │ │ └── test.tsx.fix │ │ ├── jsx-single │ │ │ ├── tslint.json │ │ │ └── test.tsx.fix │ │ ├── double-avoid-escape │ │ │ ├── tslint.json │ │ │ └── test.ts.fix │ │ ├── single-avoid-escape │ │ │ ├── tslint.json │ │ │ └── test.ts.fix │ │ ├── double-avoid-template │ │ │ └── tslint.json │ │ └── single-avoid-template │ │ │ └── tslint.json │ ├── unified-signatures │ │ └── tslint.json │ ├── variable-name │ │ ├── default │ │ │ └── tslint.json │ │ ├── ban-keywords │ │ │ └── tslint.json │ │ ├── allow-snake-case │ │ │ └── tslint.json │ │ ├── allow-pascal-case │ │ │ └── tslint.json │ │ ├── allow-leading-underscore │ │ │ └── tslint.json │ │ ├── const-only-for-caps │ │ │ └── tslint.json │ │ ├── allow-trailing-underscore │ │ │ └── tslint.json │ │ └── allow-leading-trailing-underscore │ │ │ └── tslint.json │ ├── array-type │ │ ├── array │ │ │ └── tslint.json │ │ ├── generic │ │ │ └── tslint.json │ │ └── array-simple │ │ │ └── tslint.json │ ├── await-promise │ │ ├── es6-promise │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ ├── for-await-of │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── custom-promise │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── comment-type │ │ ├── doc │ │ │ └── tslint.json │ │ ├── directive │ │ │ └── tslint.json │ │ ├── multiline │ │ │ └── tslint.json │ │ ├── combo │ │ │ └── tslint.json │ │ └── single-line │ │ │ └── tslint.json │ ├── completed-docs │ │ ├── defaults │ │ │ ├── tslint.json │ │ │ └── edge-case │ │ │ │ └── test.ts.lint │ │ ├── accessors │ │ │ └── tslint.json │ │ ├── variables │ │ │ └── tslint.json │ │ ├── privacies │ │ │ └── tslint.json │ │ ├── privacies-public │ │ │ └── tslint.json │ │ ├── accessors-public │ │ │ └── tslint.json │ │ ├── privacies-private │ │ │ └── tslint.json │ │ ├── interface-members │ │ │ └── tslint.json │ │ ├── privacies-protected │ │ │ └── tslint.json │ │ ├── methods │ │ │ └── overloads-separate-docs │ │ │ │ ├── default │ │ │ │ ├── tslint.json │ │ │ │ └── test.ts.lint │ │ │ │ ├── true │ │ │ │ └── tslint.json │ │ │ │ └── false │ │ │ │ ├── tslint.json │ │ │ │ └── test.ts.lint │ │ ├── functions │ │ │ └── overloads-separate-docs │ │ │ │ ├── default │ │ │ │ ├── tslint.json │ │ │ │ └── test.ts.lint │ │ │ │ ├── false │ │ │ │ ├── tslint.json │ │ │ │ └── test.ts.lint │ │ │ │ └── true │ │ │ │ └── tslint.json │ │ ├── constructors │ │ │ ├── privacies │ │ │ │ └── tslint.json │ │ │ └── overloads │ │ │ │ ├── default │ │ │ │ └── tslint.json │ │ │ │ └── true │ │ │ │ └── tslint.json │ │ └── locations │ │ │ └── tslint.json │ ├── no-magic-numbers │ │ ├── default │ │ │ └── tslint.json │ │ ├── default-jsx │ │ │ └── tslint.json │ │ ├── custom │ │ │ └── tslint.json │ │ ├── ignore-jsx │ │ │ └── tslint.json │ │ └── allowed-numbers │ │ │ └── tslint.json │ ├── no-reference-import │ │ └── tslint.json │ ├── no-unsafe-finally │ │ └── tslint.json │ ├── prefer-readonly │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── only-inline-lambdas │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── return-undefined │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── pre-ts-3.6 │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ ├── typedef-whitespace │ │ └── none │ │ │ └── tslint.json │ ├── increment-decrement │ │ ├── default │ │ │ └── tslint.json │ │ └── allow-post │ │ │ ├── tslint.json │ │ │ └── test.ts.fix │ ├── no-async-without-await │ │ └── tslint.json │ ├── no-default-import │ │ ├── default │ │ │ └── tslint.json │ │ └── fromModules │ │ │ └── tslint.json │ ├── no-floating-promises │ │ ├── promises │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── jquerypromise │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-inferrable-types │ │ ├── default │ │ │ └── tslint.json │ │ ├── ignore-properties │ │ │ └── tslint.json │ │ └── ignore-params │ │ │ └── tslint.json │ ├── no-mergeable-namespace │ │ └── tslint.json │ ├── no-non-null-assertion │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── no-null-undefined-union │ │ ├── tslint.json │ │ └── ts350.ts.lint │ ├── no-parameter-properties │ │ └── tslint.json │ ├── no-tautology-expression │ │ └── tslint.json │ ├── no-this-assignment │ │ ├── default │ │ │ └── tslint.json │ │ ├── allowed-names │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ └── allow-destructuring │ │ │ └── tslint.json │ ├── no-unbound-method │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ ├── whitelist │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── ignore-static │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-void-expression │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── ignore-arrow-function-shorthand │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── number-literal-format │ │ └── tslint.json │ ├── prefer-method-signature │ │ └── tslint.json │ ├── prefer-object-spread │ │ └── tslint.json │ ├── promise-function-async │ │ ├── tslint.json │ │ └── tsconfig.json │ ├── strict-string-expressions │ │ ├── allow-empty-types │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── disallow-empty-types │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── switch-final-break │ │ ├── default │ │ │ └── tslint.json │ │ └── always │ │ │ └── tslint.json │ ├── unnecessary-bind │ │ ├── typed │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── untyped │ │ │ └── tslint.json │ ├── unnecessary-else │ │ ├── default │ │ │ └── tslint.json │ │ └── allow-else-if │ │ │ └── tslint.json │ ├── function-constructor │ │ └── tslint.json │ ├── max-classes-per-file │ │ ├── two │ │ │ └── tslint.json │ │ └── one │ │ │ └── tslint.json │ ├── no-conditional-assignment │ │ └── tslint.json │ ├── no-duplicate-switch-case │ │ └── tslint.json │ ├── no-duplicate-variable │ │ ├── default │ │ │ └── tslint.json │ │ └── check-parameters │ │ │ └── tslint.json │ ├── no-shadowed-variable │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── ambient.d.ts.lint │ │ ├── ignore-class │ │ │ └── tslint.json │ │ ├── ignore-import │ │ │ └── tslint.json │ │ ├── ignore-underscore │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ └── temporal-dead-zone │ │ │ └── tslint.json │ ├── no-unnecessary-class │ │ ├── default │ │ │ └── tslint.json │ │ ├── allow-empty │ │ │ └── tslint.json │ │ ├── allow-static-only │ │ │ └── tslint.json │ │ └── allow-constructor-only │ │ │ └── tslint.json │ ├── no-unused-expression │ │ ├── default │ │ │ └── tslint.json │ │ ├── allow-fast-null-checks │ │ │ └── tslint.json │ │ ├── allow-tagged-template │ │ │ └── tslint.json │ │ └── allow-new │ │ │ └── tslint.json │ ├── only-arrow-functions │ │ ├── default │ │ │ └── tslint.json │ │ ├── allow-declarations │ │ │ └── tslint.json │ │ └── allow-named-functions │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ ├── ordered-imports │ │ ├── case-insensitive │ │ │ └── tslint.json │ │ ├── inside-module-declaration │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── named-imports-any │ │ │ └── tslint.json │ │ ├── module-source-path │ │ │ └── tslint.json │ │ ├── import-sources-any │ │ │ ├── default │ │ │ │ └── tslint.json │ │ │ └── grouped-imports │ │ │ │ ├── test.ts.fix │ │ │ │ └── tslint.json │ │ ├── lowercase-first │ │ │ └── tslint.json │ │ ├── standalone-grouped-import │ │ │ └── test.ts.fix │ │ └── grouped-imports │ │ │ └── tslint.json │ ├── max-file-line-count │ │ ├── default │ │ │ └── tslint.json │ │ └── disabled │ │ │ └── tslint.json │ ├── no-boolean-literal-compare │ │ ├── tslint.json │ │ └── tsconfig.json │ ├── no-duplicate-imports │ │ ├── default │ │ │ ├── tslint.json │ │ │ ├── test2.d.ts.lint │ │ │ └── test.d.ts.lint │ │ └── allow-namespace-imports │ │ │ ├── test.d.ts.lint │ │ │ └── tslint.json │ ├── no-import-side-effect │ │ ├── default │ │ │ └── tslint.json │ │ └── ignore-module │ │ │ └── tslint.json │ ├── no-invalid-template-strings │ │ └── tslint.json │ ├── no-irregular-whitespace │ │ └── tslint.json │ ├── no-promise-as-boolean │ │ ├── es6-promise │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── custom-promise │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-switch-case-fall-through │ │ └── tslint.json │ ├── no-trailing-whitespace │ │ ├── default │ │ │ └── tslint.json │ │ ├── zero-width-no-break-space │ │ │ ├── tslint.json │ │ │ ├── test.ts.lint │ │ │ └── test2.ts.lint │ │ ├── ignore-jsdoc │ │ │ └── tslint.json │ │ ├── ignore-comments │ │ │ └── tslint.json │ │ ├── skip-blank-lines │ │ │ └── tslint.json │ │ └── ignore-template-strings │ │ │ └── tslint.json │ ├── no-unnecessary-initializer │ │ └── tslint.json │ ├── restrict-plus-operands │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── esnext-bigint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── strict-comparisons │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ ├── allow-object-equal-comparison │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── allow-string-order-comparison │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── strict-type-predicates │ │ ├── unknown │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ ├── no-strict-null-checks │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ └── strict-null-checks │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ ├── unnecessary-constructor │ │ ├── default │ │ │ └── tslint.json │ │ └── check-super-calls │ │ │ └── tslint.json │ ├── arrow-return-shorthand │ │ ├── default │ │ │ └── tslint.json │ │ └── multiline │ │ │ └── tslint.json │ ├── cyclomatic-complexity │ │ ├── defaultThreshold │ │ │ └── tslint.json │ │ ├── invalidThreshold │ │ │ └── tslint.json │ │ └── specifiedThreshold │ │ │ └── tslint.json │ ├── interface-over-type-literal │ │ ├── tslint.json │ │ └── test.ts.fix │ ├── newline-before-return │ │ └── default │ │ │ └── tslint.json │ ├── no-consecutive-blank-lines │ │ ├── default │ │ │ └── tslint.json │ │ ├── multiple │ │ │ └── tslint.json │ │ └── invalid-option │ │ │ └── tslint.json │ ├── no-inferred-empty-object-type │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-parameter-reassignment │ │ └── tslint.json │ ├── space-before-function-paren │ │ ├── always │ │ │ └── tslint.json │ │ └── never │ │ │ └── tslint.json │ ├── space-within-parens │ │ ├── no-space │ │ │ └── tslint.json │ │ ├── force-one-space │ │ │ └── tslint.json │ │ └── force-two-spaces │ │ │ └── tslint.json │ ├── strict-boolean-expressions │ │ ├── default │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ ├── allow-enum │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── allow-mix │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-number │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-string │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── no-allow-mix │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── no-null-checks │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ │ ├── allow-null-union │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── ignore-rhs │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-undefined-union │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-boolean-undefined-union │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── no-null-checks-allow-number-string │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── no-null-checks-allow-null-union │ │ │ ├── tslint.json │ │ │ └── tsconfig.json │ ├── adjacent-overload-signatures │ │ ├── default │ │ │ └── tslint.json │ │ └── ignore-accessors │ │ │ └── tslint.json │ ├── binary-expression-operand-order │ │ └── tslint.json │ ├── newline-per-chained-call │ │ └── default │ │ │ └── tslint.json │ ├── no-angle-bracket-type-assertion │ │ └── tslint.json │ ├── no-unnecessary-callback-wrapper │ │ └── tslint.json │ ├── one-variable-per-declaration │ │ ├── default │ │ │ └── tslint.json │ │ └── ignore-for-loop │ │ │ └── tslint.json │ ├── prefer-conditional-expression │ │ ├── default │ │ │ └── tslint.json │ │ └── check-else-if │ │ │ └── tslint.json │ ├── prefer-function-over-method │ │ ├── default │ │ │ └── tslint.json │ │ ├── allow-public │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ ├── allow-protected │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ │ └── allow-public-and-protected │ │ │ ├── tslint.json │ │ │ └── test.ts.lint │ ├── triple-equals │ │ ├── allow-null-check │ │ │ └── tslint.json │ │ └── allow-undefined-check │ │ │ └── tslint.json │ ├── comment-format │ │ ├── lower │ │ │ ├── tslint.json │ │ │ └── test.tsx.fix │ │ ├── upper │ │ │ └── tslint.json │ │ ├── allow-trailing-lowercase │ │ │ └── tslint.json │ │ ├── exceptions-pattern │ │ │ └── tslint.json │ │ └── exceptions-words │ │ │ └── tslint.json │ ├── object-literal-key-quotes │ │ ├── always │ │ │ └── tslint.json │ │ ├── as-needed │ │ │ └── tslint.json │ │ ├── consistent │ │ │ └── tslint.json │ │ └── consistent-as-needed │ │ │ └── tslint.json │ ├── object-literal-shorthand │ │ ├── always │ │ │ └── tslint.json │ │ ├── never │ │ │ └── tslint.json │ │ └── onlyMethods │ │ │ └── tslint.json │ ├── trailing-comma │ │ ├── multiline-never │ │ │ └── tslint.json │ │ ├── multiline-always │ │ │ └── tslint.json │ │ ├── singleline-always │ │ │ └── tslint.json │ │ ├── singleline-never │ │ │ └── tslint.json │ │ └── spec-compliant │ │ │ └── tslint.json │ ├── max-line-length │ │ ├── default │ │ │ └── tslint.json │ │ └── check-strings-and-regex │ │ │ └── tslint.json │ ├── no-object-literal-type-assertion │ │ ├── default │ │ │ └── tslint.json │ │ └── allow-arguments │ │ │ └── tslint.json │ ├── type-literal-delimiter │ │ ├── one-liners-with-no-trailings │ │ │ └── tslint.json │ │ └── one-liners-with-trailings │ │ │ └── tslint.json │ ├── member-ordering │ │ ├── public-before-private │ │ │ ├── tslint.json │ │ │ └── test.ts.fix │ │ ├── static-before-instance │ │ │ ├── tslint.json │ │ │ └── test.ts.fix │ │ ├── fields-first │ │ │ └── tslint.json │ │ ├── statics-first │ │ │ └── tslint.json │ │ ├── variables-before-functions │ │ │ └── tslint.json │ │ ├── instance-sandwich │ │ │ └── tslint.json │ │ ├── alphabetize │ │ │ └── tslint.json │ │ ├── custom-categories │ │ │ └── test.ts.fix │ │ ├── fix-trivia │ │ │ └── tslint.json │ │ ├── alphabetize-nested │ │ │ ├── tslint.json │ │ │ └── test.ts.fix │ │ ├── custom │ │ │ └── tslint.json │ │ ├── omit-access-modifier │ │ │ ├── test.ts.fix │ │ │ └── tslint.json │ │ └── mix-old-options │ │ │ └── tslint.json │ ├── no-submodule-imports │ │ ├── dynamic-imports │ │ │ └── tslint.json │ │ └── static-imports │ │ │ └── tslint.json │ ├── no-invalid-this │ │ └── enabled │ │ │ └── tslint.json │ ├── import-blacklist │ │ └── tslint.json │ └── ban-types │ │ └── tslint.json ├── files │ ├── tsconfig-test │ │ ├── good.test.ts │ │ ├── other.test.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── tsconfig-no-ts-files │ │ ├── only.d.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── .gitattributes │ ├── config-findup │ │ ├── yaml-config │ │ │ ├── tslint.json │ │ │ ├── tslint.yml │ │ │ └── tslint.yaml │ │ ├── contains-config │ │ │ └── tslint.json │ │ ├── no-config │ │ │ └── index.test.ts │ │ ├── yml-config │ │ │ ├── tslint.yaml │ │ │ └── tslint.yml │ │ └── tslint.json │ ├── print-config │ │ ├── a.ts │ │ └── b.ts │ ├── tsconfig-invalid │ │ ├── syntax-error.json │ │ ├── empty-files.json │ │ └── no-match.json │ ├── multiple-excludes │ │ ├── invalid.test.ts │ │ ├── valid.test.ts │ │ ├── invalid2.test.ts │ │ └── tslint.json │ ├── tsconfig-allow-js │ │ ├── valid.test.ts │ │ ├── testfile.test.js │ │ └── tsconfig.json │ ├── custom-rule-rule-test │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── formatters │ │ ├── tapFormatter.test.ts │ │ ├── jsonFormatter.test.ts │ │ ├── pmdFormatter.test.ts │ │ ├── msbuildFormatter.test.ts │ │ ├── proseFormatter.test.ts │ │ ├── vsoFormatter.test.ts │ │ ├── externalFormatter.test.ts │ │ ├── fileslistFormatter.test.ts │ │ ├── stylishFormatter.test.ts │ │ └── codeFrameFormatter.test.ts │ ├── project-multiple-fixes │ │ ├── .gitignore │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── custom-rule-cli-rule-test │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── typed-rule │ │ ├── fail.test.ts │ │ ├── tslint.json │ │ └── tsconfig.json │ ├── tsconfig-extends-relative │ │ ├── src │ │ │ └── src.test.ts │ │ ├── test │ │ │ ├── test.test.ts │ │ │ └── tsconfig.json │ │ ├── tsconfig.json │ │ ├── tslint-fail.json │ │ └── tslint-ok.json │ ├── config-exclude │ │ ├── excluded.ts │ │ ├── excluded1.ts │ │ ├── included.ts │ │ ├── subdir │ │ │ ├── excluded.ts │ │ │ ├── excluded2.ts │ │ │ └── tslint-extending.json │ │ └── tslint-exclude-one.json │ ├── tsconfig-resolve-json-module │ │ ├── test.json │ │ ├── tslint.json │ │ ├── index.ts │ │ └── tsconfig.json │ ├── incorrect-rule-test │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── fixes-test │ │ ├── tslint.json │ │ └── test.ts.fix │ ├── incorrect-rule-test-copy │ │ ├── tslint.json │ │ └── test.ts.lint │ ├── incorrect-fixes-test │ │ ├── tslint.json │ │ └── test.ts.fix │ ├── allow-js-exclude-node-modules │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── multiple-fixes-test │ │ └── tslint.json │ └── custom-rules │ │ └── testUncompiledRule.ts ├── config │ ├── tslint-invalid.json │ ├── relative-rules-directory │ │ └── index.js │ ├── tslint-invalid.yaml │ ├── tslint-with-bom.json │ ├── tslint-almost-empty.json │ ├── tslint-extends-invalid.json │ ├── tslint-extends-package-no-mod.json │ ├── tslint-custom-rules-with-package-fallback.json │ ├── tslint-custom-rules-with-package.json │ ├── tslint-with-jsrules.json │ ├── tslint-default-severity-unspecified.json │ ├── tslint-default-severity-off.json │ ├── tslint-default-severity-error.json │ ├── tslint-default-severity-warning.json │ ├── tslint-custom-rules-uncompiled.json │ ├── tslint-extends-default-severity-only-in-extended.json │ ├── tslint-extends-builtin.json │ ├── tslint-extends-package-boolean.json │ ├── tslint-extends-default-severity.json │ ├── tslint-custom-rules.json │ ├── tslint-extends-default-severity-precedence.json │ ├── tslint-extends-package-partial.json │ ├── tslint-custom-rules-with-dir.json │ ├── tslint-extends-package-warning.json │ └── tslint-extends-relative.json ├── external │ ├── tslint-test-config │ │ ├── index.js │ │ ├── package.json │ │ └── tslint.json │ ├── tslint-test-custom-rules │ │ ├── rules │ │ │ └── index.js │ │ ├── package.json │ │ └── tslint.json │ ├── tslint-test-config-non-relative │ │ ├── index.js │ │ ├── tslint.json │ │ └── package.json │ └── tslint-test-custom-formatter │ │ └── package.json ├── tslint.json └── executable │ └── npm-like-executable.cmd ├── bin └── tslint ├── docs └── Gemfile ├── .prettierrc ├── src └── custom-types.d.ts ├── .editorconfig └── .vscode └── tasks.json /test/rules/encoding/utf8.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/eofline/empty.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/good.test.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/$.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/config/tslint-invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | -------------------------------------------------------------------------------- /test/external/tslint-test-config/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/files/tsconfig-no-ts-files/only.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/lib.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/config/relative-rules-directory/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/files/.gitattributes: -------------------------------------------------------------------------------- 1 | *.ts text eol=lf 2 | -------------------------------------------------------------------------------- /test/rules/eofline/invalid.ts.fix: -------------------------------------------------------------------------------- 1 | let foo = bar; -------------------------------------------------------------------------------- /test/rules/file-name-casing/ignore/file.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/underscore.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/external/tslint-test-custom-rules/rules/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/files/config-findup/yaml-config/tslint.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/files/print-config/a.ts: -------------------------------------------------------------------------------- 1 | console.log("a"); 2 | -------------------------------------------------------------------------------- /test/files/print-config/b.ts: -------------------------------------------------------------------------------- 1 | console.log("b"); 2 | -------------------------------------------------------------------------------- /test/files/tsconfig-invalid/syntax-error.json: -------------------------------------------------------------------------------- 1 | , 2 | -------------------------------------------------------------------------------- /test/rules/eofline/valid.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/emptyFile/test.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportAliasSecond.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/InterfaceFile.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/use-default-type-parameter/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/external/tslint-test-config-non-relative/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/files/config-findup/contains-config/tslint.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/files/config-findup/no-config/index.test.ts: -------------------------------------------------------------------------------- 1 | ''; 2 | -------------------------------------------------------------------------------- /test/files/multiple-excludes/invalid.test.ts: -------------------------------------------------------------------------------- 1 | var foo = 42 -------------------------------------------------------------------------------- /test/files/multiple-excludes/valid.test.ts: -------------------------------------------------------------------------------- 1 | var foo = 42; -------------------------------------------------------------------------------- /test/files/tsconfig-allow-js/valid.test.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/other.test.ts: -------------------------------------------------------------------------------- 1 | console.log(1); 2 | -------------------------------------------------------------------------------- /test/rules/eofline/only-whitespace.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/camel-case/camelCase.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/ComponentName.tsx.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/camelCase.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/kebab-case/kebab-case.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/pascal-case/PascalCase.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/snake-case/snake_case.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportAliasWithComment.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportRegularAlias.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportWithLineBreaks.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/config/tslint-invalid.yaml: -------------------------------------------------------------------------------- 1 | {{ hello I am invalid } 2 | -------------------------------------------------------------------------------- /test/files/config-findup/yaml-config/tslint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ... 3 | -------------------------------------------------------------------------------- /test/files/config-findup/yml-config/tslint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ... 3 | -------------------------------------------------------------------------------- /test/files/config-findup/yml-config/tslint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ... 3 | -------------------------------------------------------------------------------- /test/files/custom-rule-rule-test/test.ts.lint: -------------------------------------------------------------------------------- 1 | var test = 5; 2 | -------------------------------------------------------------------------------- /test/files/formatters/tapFormatter.test.ts: -------------------------------------------------------------------------------- 1 | var x = 123; 2 | -------------------------------------------------------------------------------- /test/files/project-multiple-fixes/.gitignore: -------------------------------------------------------------------------------- 1 | /testfile.test.ts -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/correct.ts.fix: -------------------------------------------------------------------------------- 1 | "foo"; -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/nonComponentName.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/PascalCase.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/invalid-option/snake_case.ts.lint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/config/tslint-with-bom.json: -------------------------------------------------------------------------------- 1 | { "jsRules": { }, "rules": { } } -------------------------------------------------------------------------------- /test/files/config-findup/yaml-config/tslint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ... 3 | -------------------------------------------------------------------------------- /test/files/custom-rule-cli-rule-test/test.ts.lint: -------------------------------------------------------------------------------- 1 | var test = 5; 2 | -------------------------------------------------------------------------------- /test/files/multiple-excludes/invalid2.test.ts: -------------------------------------------------------------------------------- 1 | module.exports = {} -------------------------------------------------------------------------------- /test/files/tsconfig-allow-js/testfile.test.js: -------------------------------------------------------------------------------- 1 | module.exports = {} -------------------------------------------------------------------------------- /test/rules/no-restricted-globals/foo.d.ts: -------------------------------------------------------------------------------- 1 | export var name: string; -------------------------------------------------------------------------------- /test/rules/no-unnecessary-qualifier/b.test.ts: -------------------------------------------------------------------------------- 1 | export type T = number; -------------------------------------------------------------------------------- /test/rules/whitespace/all/bom.ts.lint: -------------------------------------------------------------------------------- 1 | import * as $t from 't'; 2 | -------------------------------------------------------------------------------- /test/rules/whitespace/check-separator/test.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = "bar"; -------------------------------------------------------------------------------- /bin/tslint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require("../lib/tslintCli"); 4 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'github-pages' 3 | -------------------------------------------------------------------------------- /test/config/tslint-almost-empty.json: -------------------------------------------------------------------------------- 1 | { "jsRules": {}, "rules": {} } 2 | -------------------------------------------------------------------------------- /test/files/typed-rule/fail.test.ts: -------------------------------------------------------------------------------- 1 | declare const fn: any; 2 | fn(); 3 | -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/src/src.test.ts: -------------------------------------------------------------------------------- 1 | export interface Test {} -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/test/test.test.ts: -------------------------------------------------------------------------------- 1 | export interface IFoo {} -------------------------------------------------------------------------------- /test/files/tsconfig-invalid/empty-files.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [] 3 | } 4 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/anonymous.test.ts: -------------------------------------------------------------------------------- 1 | export default 0; 2 | -------------------------------------------------------------------------------- /test/rules/no-namespace/allow-declarations/test.d.ts.lint: -------------------------------------------------------------------------------- 1 | namespace N { } 2 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/ignore-pattern/a.test.ts: -------------------------------------------------------------------------------- 1 | export class _A {} 2 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/match-declaration-order/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/rules/file-header/empty-file/test.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [missing file header] 3 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/noStrictNullChecks/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/node_modules/react.ts: -------------------------------------------------------------------------------- 1 | export default x = 0; -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/match-declaration-order-only/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/rules/semicolon/never/eof2.ts.lint: -------------------------------------------------------------------------------- 1 | return; 2 | ~ [Unnecessary semicolon] -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/skip.js.lint: -------------------------------------------------------------------------------- 1 | [typescript]: < 2.0.0 2 | 'foo'; -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/skip.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: 0.0.0 2 | 'foo'; -------------------------------------------------------------------------------- /test/rules/deprecation/other2.test.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated */ 2 | let x = ""; 3 | export = x; -------------------------------------------------------------------------------- /test/rules/forin/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "forin": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/named.test.ts: -------------------------------------------------------------------------------- 1 | export default function a() {} 2 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/malformed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | , 3 | } 4 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/node_modules/react/addons.ts: -------------------------------------------------------------------------------- 1 | export const x = 0; -------------------------------------------------------------------------------- /test/rules/radix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "radix": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/config/tslint-extends-invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tslint-invalid.json" 3 | } 4 | -------------------------------------------------------------------------------- /test/files/config-exclude/excluded.ts: -------------------------------------------------------------------------------- 1 | console.log("missing semicolon at end of line") 2 | -------------------------------------------------------------------------------- /test/files/config-exclude/excluded1.ts: -------------------------------------------------------------------------------- 1 | console.log("missing semicolon at end of line") 2 | -------------------------------------------------------------------------------- /test/files/config-exclude/included.ts: -------------------------------------------------------------------------------- 1 | console.log("missing semicolon at end of line") 2 | -------------------------------------------------------------------------------- /test/rules/align/statements/bom.ts.fix: -------------------------------------------------------------------------------- 1 | var foo = 1; 2 | var bar = 2; 3 | var baz = 3; 4 | -------------------------------------------------------------------------------- /test/rules/eofline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "eofline": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-arg/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-arg": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-eval/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-eval": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "trailingComma": "all" 5 | } 6 | -------------------------------------------------------------------------------- /test/files/config-exclude/subdir/excluded.ts: -------------------------------------------------------------------------------- 1 | console.log("missing semicolon at end of line") 2 | -------------------------------------------------------------------------------- /test/files/config-exclude/subdir/excluded2.ts: -------------------------------------------------------------------------------- 1 | console.log("missing semicolon at end of line") 2 | -------------------------------------------------------------------------------- /test/files/tsconfig-resolve-json-module/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "dry": false, 3 | "debug": false 4 | } -------------------------------------------------------------------------------- /test/rules/class-name/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/curly/defaults/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "curly": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/encoding/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "encoding": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/eofline/only-whitespace.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | 3 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/file-header/good-newline/test.ts.lint: -------------------------------------------------------------------------------- 1 | /* Copyright 2019 */ 2 | 3 | class Foo {} 4 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/ignore/complaint.tsx.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/new-parens/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "new-parens": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-any/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-bitwise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-bitwise": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-for-in/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-for-in": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/node_modules/a.ts: -------------------------------------------------------------------------------- 1 | declare var x: any; 2 | export = x; 3 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/type-checked/a.test.ts: -------------------------------------------------------------------------------- 1 | export class A {} 2 | export var a: A; 3 | -------------------------------------------------------------------------------- /test/rules/one-line/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-line": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/semicolon/never/eof1.ts.lint: -------------------------------------------------------------------------------- 1 | var foo = bar; 2 | ~ [Unnecessary semicolon] -------------------------------------------------------------------------------- /test/rules/typedef/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/use-isnan/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "use-isnan": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/config/tslint-extends-package-no-mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-test-custom-rules" 3 | } 4 | -------------------------------------------------------------------------------- /test/files/config-findup/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/incorrect-rule-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-eval": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-invalid/no-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "*.js" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/typed-rule/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/deprecation/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "deprecation": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/eofline/disabled.ts.lint: -------------------------------------------------------------------------------- 1 | let bar = baz; 2 | let foo = bar; // tslint:disable-line: eofline -------------------------------------------------------------------------------- /test/rules/file-name-casing/kebab-case/noKebabCase.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be kebab-case] 3 | -------------------------------------------------------------------------------- /test/rules/no-console/all/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-construct/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-construct": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-debugger/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-debugger": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-empty/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-empty": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-reference/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-reference": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-string-throw/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-string-throw": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/prefer-for-of/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-for-of": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-while/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-while": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/semicolon/enabled/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/static-this/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "static-this": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/fixes-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/incorrect-rule-test-copy/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-eval": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-no-ts-files/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "*" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "good.test.ts" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/members/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "members"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/eofline/invalid.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/file-name-casing/camel-case/no-camel-case.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be camelCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/my-button.component.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/notPascalCase.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/not_camel_case.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be camelCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/pascal-case/no-pascal-case.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/snake-case/no-snake-case.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be snake_case] 3 | -------------------------------------------------------------------------------- /test/rules/label-position/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "label-position": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-for-in-array/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-for-in-array": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-misused-new/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-misused-new": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-null-keyword/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-null-keyword": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-return-await/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-return-await": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/default/commonjsModule.ts: -------------------------------------------------------------------------------- 1 | const x: any = 0; 2 | namespace x {} 3 | export = x; 4 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/jsx/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-var-keyword/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-var-keyword": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-var-requires/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-var-requires": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/switch-default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "switch-default": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typeof-compare/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typeof-compare": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/arguments/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "arguments"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/elements/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "elements"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/arrow-parens/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "arrow-parens": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ban-comma-operator/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ban-comma-operator": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ban-ts-ignore/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ban-ts-ignore": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/callable-types/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "callable-types": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/curly/as-needed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "curly": [true, "as-needed"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/InvalidNonComponentName.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be camelCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/invalid-component-name.tsx.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/not_kebab_case.tsx.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be kebab-case] 3 | -------------------------------------------------------------------------------- /test/rules/import-spacing/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import-spacing": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/indent/spaces-2/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": [true, "spaces", 2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/indent/spaces-4/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": [true, "spaces", 4] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/indent/tabs-2/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": [true, "tabs", 2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/indent/tabs-4/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": [true, "tabs", 4] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/interface-name/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-name": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/invalid-void/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "invalid-void": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/jsdoc-format/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "jsdoc-format": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-access/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-default-export/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-default-export": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-super/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-super": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-dynamic-delete/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-dynamic-delete": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-empty-interface/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-empty-interface": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-internal-module/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-internal-module": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-namespace/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-namespace": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-redundant-jsdoc/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-redundant-jsdoc": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-require-imports/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-require-imports": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-restricted-globals/custom-global.d.ts: -------------------------------------------------------------------------------- 1 | declare var badGlobal: any; 2 | declare var goodGlobal: any; -------------------------------------------------------------------------------- /test/rules/no-sparse-arrays/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-sparse-arrays": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-string-literal/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-string-literal": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/unknown/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-const/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-const": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-switch/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-switch": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-template/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-template": [true] 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-double/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = "single"; 2 | var unbalancedSingleAfter = ('a) 3 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-single/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = 'single'; 2 | var unbalancedSingleAfter = ("a) 3 | -------------------------------------------------------------------------------- /test/rules/semicolon/never/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "never"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unified-signatures/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unified-signatures": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/variable-name/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/config-exclude/subdir/tslint-extending.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint-exclude-one.json" 3 | } 4 | -------------------------------------------------------------------------------- /test/files/custom-rule-cli-rule-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-fail": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/incorrect-fixes-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/multiple-excludes/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always"] 4 | } 5 | } -------------------------------------------------------------------------------- /test/files/tsconfig-no-ts-files/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "tslint:latest" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": [true, "log"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/typed-rule/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/_integration/error-format/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-const": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/correct.js.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.0.0 2 | 'foo'; 3 | ~~~~~ [' should be "] -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/correct.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.0.0 2 | 'foo'; 3 | ~~~~~ [' should be "] -------------------------------------------------------------------------------- /test/rules/align/parameters/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "parameters"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/statements/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "statements"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/array-type/array/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-type": [true, "array"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/array-type/generic/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-type": [true, "generic"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/await-promise/es6-promise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "await-promise": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/await-promise/for-await-of/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "await-promise": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/doc/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "doc"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/completed-docs/defaults/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/eofline/whitespace.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/no-magic-numbers/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-reference-import/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-reference-import": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-finally/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-finally": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/prefer-readonly/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-readonly": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/backtick/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "backtick"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/double/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/single/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/return-undefined/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "return-undefined": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/semicolon/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typedef-whitespace/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef-whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/custom-types.d.ts: -------------------------------------------------------------------------------- 1 | declare module "builtin-modules" { 2 | let result: string[]; 3 | export = result; 4 | } 5 | -------------------------------------------------------------------------------- /test/config/tslint-custom-rules-with-package-fallback.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": ["relative-rules-directory"] 3 | } 4 | -------------------------------------------------------------------------------- /test/config/tslint-custom-rules-with-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": ["tslint-test-custom-rules/rules"] 3 | } 4 | -------------------------------------------------------------------------------- /test/files/allow-js-exclude-node-modules/test.ts: -------------------------------------------------------------------------------- 1 | import * as dependency from 'dependency'; 2 | console.log(dependency); 3 | -------------------------------------------------------------------------------- /test/files/tsconfig-resolve-json-module/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "tslint:latest" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/deprecation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/encoding/utf16be.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/HEAD/test/rules/encoding/utf16be.ts.lint -------------------------------------------------------------------------------- /test/rules/encoding/utf16le.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/HEAD/test/rules/encoding/utf16le.ts.lint -------------------------------------------------------------------------------- /test/rules/increment-decrement/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "increment-decrement": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-async-without-await/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-async-without-await": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-default-import/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-default-import": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-floating-promises/promises/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-floating-promises": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-inferrable-types/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-inferrable-types": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-magic-numbers/default-jsx/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-mergeable-namespace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-mergeable-namespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-non-null-assertion/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-non-null-assertion": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-null-undefined-union/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-null-undefined-union": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-parameter-properties/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-parameter-properties": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-tautology-expression/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-tautology-expression": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-this-assignment/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-this-assignment": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unbound-method/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unbound-method": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-variable": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-use-before-declare": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-void-expression/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-void-expression": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/number-literal-format/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "number-literal-format": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-method-signature/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-method-signature": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-object-spread/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-object-spread": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/promise-function-async/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "promise-function-async": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-double/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-single/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/return-undefined/pre-ts-3.6/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "return-undefined": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-string-expressions/allow-empty-types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/rules/switch-final-break/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "switch-final-break": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-bind/typed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-bind": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-else/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-else": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/all/import.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >=2.4.0 2 | import('./foo') 3 | .then(foo => { foo.setup(); }); 4 | -------------------------------------------------------------------------------- /test/files/formatters/jsonFormatter.test.ts: -------------------------------------------------------------------------------- 1 | var x = 123; 2 | var y = "abcd"; 3 | var z = { 4 | x: x, 5 | y: y 6 | }; 7 | -------------------------------------------------------------------------------- /test/files/formatters/pmdFormatter.test.ts: -------------------------------------------------------------------------------- 1 | var x = 123; 2 | var y = "abcd"; 3 | var z = { 4 | x: x, 5 | y: y 6 | }; 7 | -------------------------------------------------------------------------------- /test/rules/array-type/array-simple/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-type": [true, "array-simple"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/await-promise/custom-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/await-promise/es6-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/comment-type/directive/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "directive"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/multiline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "multiline"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/curly/ignore-same-line/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "curly": [true, "ignore-same-line"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/encoding/utf8-bom.ts.lint: -------------------------------------------------------------------------------- 1 | A 2 | ~ [This file is encoded as UTF-8 with byte-order marker (BOM) instead of UTF-8.] 3 | -------------------------------------------------------------------------------- /test/rules/function-constructor/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "function-constructor": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/emptyFile/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "LF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/failure/CRLF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "LF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/failure/LF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "CRLF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/success/LF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "LF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "match-default-export-name": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/max-classes-per-file/two/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-classes-per-file": [true, 2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-access/no-public/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "no-public"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-conditional-assignment/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-conditional-assignment": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-switch-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-switch-case": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-variable/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-for-in-array/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-namespace/default/test.d.ts.lint: -------------------------------------------------------------------------------- 1 | namespace N { } 2 | ~~~~~~~~~~~~~~~ ['namespace' and 'module' are disallowed] 3 | -------------------------------------------------------------------------------- /test/rules/no-shadowed-variable/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadowed-variable": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-class/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-class": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-qualifier/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unnecessary-qualifier/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-qualifier": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unused-expression/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-expression": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/type-checked/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-variable": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/only-arrow-functions/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "only-arrow-functions": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/case-insensitive/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-bind/untyped/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-bind": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/await-promise/for-await-of/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/combo/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "singleline", "doc"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/single-line/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "singleline"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/good/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/success/CRLF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "CRLF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/max-file-line-count/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-file-line-count": [true, 10] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/max-file-line-count/disabled/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-file-line-count": [true, 10] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-access/accessor/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "check-accessor"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-boolean-literal-compare/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-boolean-literal-compare": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-duplicate-imports/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-imports": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-import-side-effect/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-import-side-effect": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-invalid-template-strings/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-invalid-template-strings": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-irregular-whitespace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-irregular-whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-non-null-assertion/test.ts.lint: -------------------------------------------------------------------------------- 1 | var x = null 2 | 3 | x!.y = null 4 | ~~ [Forbidden non null assertion] 5 | -------------------------------------------------------------------------------- /test/rules/no-promise-as-boolean/es6-promise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-promise-as-boolean": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-switch-case-fall-through/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-switch-case-fall-through": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-trailing-whitespace/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unbound-method/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unbound-method/whitelist/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unnecessary-initializer/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-initializer": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-readonly/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/promise-function-async/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/jsx-double/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true,"jsx-double", "single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/jsx-single/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double", "jsx-single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/restrict-plus-operands/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "restrict-plus-operands": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/return-undefined/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-comparisons/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-comparisons": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/unknown/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-type-predicates": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/switch-final-break/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "switch-final-break": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-bind/typed/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-constructor/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-constructor": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/use-default-type-parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "use-default-type-parameter": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/statements/bom.ts.lint: -------------------------------------------------------------------------------- 1 | var foo = 1; 2 | var bar = 2; 3 | var baz = 3; 4 | ~~~~~~~~~~~~ [statements are not aligned] 5 | -------------------------------------------------------------------------------- /test/rules/arrow-return-shorthand/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "arrow-return-shorthand": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/cyclomatic-complexity/defaultThreshold/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "cyclomatic-complexity": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/interface-name/always-prefix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-name": [true, "always-prefix"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/interface-name/never-prefix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-name": [true, "never-prefix"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/interface-over-type-literal/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-over-type-literal": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/match-default-export-name/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-access/constructor/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "check-constructor"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/newline-before-return/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "newline-before-return": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-any/ignore-rest-args/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-any": [true, { "ignore-rest-args": true }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-boolean-literal-compare/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-consecutive-blank-lines/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-consecutive-blank-lines": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-console/list/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": [true, "dir", "error", "log", "warn"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-empty/allow-empty-catch/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-empty": [true, "allow-empty-catch"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-floating-promises/promises/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/dev/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-implicit-dependencies": [true, "dev"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-inferred-empty-object-type/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-inferred-empty-object-type/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-inferred-empty-object-type": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-parameter-reassignment/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-parameter-reassignment": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unbound-method/ignore-static/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/type-checked/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/ordered-imports/inside-module-declaration/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/return-undefined/pre-ts-3.6/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/space-before-function-paren/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-before-function-paren": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/space-within-parens/no-space/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-within-parens": [true, 0] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/unknown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/variable-name/ban-keywords/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "ban-keywords"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/check-separator/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "whitespace": [true, "check-separator"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/project-multiple-fixes/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": [ 3 | "before.test.ts", 4 | "after.test.ts" 5 | ] 6 | } -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "exclude": [ 4 | "../src" 5 | ] 6 | } -------------------------------------------------------------------------------- /test/rules/adjacent-overload-signatures/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "adjacent-overload-signatures": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/binary-expression-operand-order/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "binary-expression-operand-order": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/cyclomatic-complexity/invalidThreshold/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "cyclomatic-complexity": [true, -5] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/cyclomatic-complexity/specifiedThreshold/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "cyclomatic-complexity": [true, 3] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/empty-file/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/good-shebang/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/increment-decrement/allow-post/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "increment-decrement": [true, "allow-post"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/newline-per-chained-call/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "newline-per-chained-call": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-angle-bracket-type-assertion/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-angle-bracket-type-assertion": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-consecutive-blank-lines/multiple/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-consecutive-blank-lines": [true, 2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-empty/allow-empty-functions/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-empty": [true, "allow-empty-functions"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-floating-promises/jquerypromise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-magic-numbers/custom/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": [true, 1337, 1337.7, -1337, -0] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-callback-wrapper/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-callback-wrapper": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/ignore-pattern/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/type-checked/some.test.ts: -------------------------------------------------------------------------------- 1 | export class SomeClass {} 2 | 3 | export const someVar = {prop: new SomeClass()}; 4 | -------------------------------------------------------------------------------- /test/rules/one-variable-per-declaration/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-variable-per-declaration": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-conditional-expression/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-conditional-expression": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-function-over-method/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-function-over-method": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/double-avoid-escape/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double", "avoid-escape"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/single-avoid-escape/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single", "avoid-escape"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/single/test.tsx.lint: -------------------------------------------------------------------------------- 1 | let foo = 2 | ~~~~~ [" should be '] 3 | -------------------------------------------------------------------------------- /test/rules/restrict-plus-operands/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/restrict-plus-operands/esnext-bigint/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/restrict-plus-operands/esnext-bigint/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "restrict-plus-operands": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/no-strict-null-checks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-type-predicates": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/strict-null-checks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-type-predicates": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/triple-equals/allow-null-check/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "triple-equals": [true, "allow-null-check"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typedef/parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "parameter" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/variable-name/allow-snake-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-snake-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/check-postbrace/test.ts.fix: -------------------------------------------------------------------------------- 1 | function() { return 5;} 2 | 3 | function() { 4 | const something: number = 5; 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/check-postbrace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "whitespace": [true, "check-postbrace"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/config/tslint-with-jsrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsRules": { 3 | "rule": { 4 | "severity": "error" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /test/files/tsconfig-allow-js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "noEmit": false 5 | } 6 | } -------------------------------------------------------------------------------- /test/rules/comment-format/lower/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-format": [true, "check-space", "check-lowercase"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-format/upper/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-format": [true, "check-space", "check-uppercase"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/good-single-line/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/good-use-strict/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/camel-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "camel-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/kebab-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "kebab-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/pascal-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "pascal-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/snake-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "snake-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/optional/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-implicit-dependencies": [true, "optional"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-namespace/allow-declarations/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-namespace": [true, "allow-declarations"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-trailing-whitespace/zero-width-no-break-space/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-qualifier/test-global-2.ts.lint: -------------------------------------------------------------------------------- 1 | namespace M { 2 | // Used in test-global.ts 3 | export type T = number; 4 | } 5 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/check-parameters/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-key-quotes/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-key-quotes": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-shorthand/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-shorthand": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-const/default/ambient.d.ts.lint: -------------------------------------------------------------------------------- 1 | // no errors in declaration files 2 | let foo = 0; 3 | namespace bar { 4 | let foo = 0; 5 | } -------------------------------------------------------------------------------- /test/rules/prefer-readonly/only-inline-lambdas/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-template/allow-single-concat/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-template": [true, "allow-single-concat"] 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/space-before-function-paren/never/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-before-function-paren": [true, "never"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/space-within-parens/force-one-space/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-within-parens": [true, 1] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/space-within-parens/force-two-spaces/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-within-parens": [true, 2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-enum/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-mix/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-number/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-string/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-allow-mix/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-null-checks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/trailing-comma/multiline-never/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "trailing-comma": [true, {"multiline": "never"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/variable-name/allow-pascal-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-pascal-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/multiple-fixes-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true], 4 | "semicolon": [true, "always"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/_integration/react/invalid.tsx.lint: -------------------------------------------------------------------------------- 1 | // don't crash on invalid jsx 2 | // tslint:disable 3 | const a = 4 | 6 | 7 | -------------------------------------------------------------------------------- /test/rules/eofline/comment.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | // some comment in last line 3 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/file-header/bad/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d", "Good header 2"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/invalid-option/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "invalid-option"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/jsdoc-format/check-multiline-start/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "jsdoc-format": [true, "check-multiline-start"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/failure/LF/test.ts.fix: -------------------------------------------------------------------------------- 1 | // this line uses LF 2 | // this line uses LF 3 | // this line uses LF 4 | // this line uses LF 5 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/success/LF/test.ts.lint: -------------------------------------------------------------------------------- 1 | // this line uses LF 2 | // this line uses LF 3 | // this line uses LF 4 | // this line uses LF 5 | -------------------------------------------------------------------------------- /test/rules/max-line-length/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-line-length": [true, { 4 | "limit": 140 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/member-access/parameter-property/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "check-parameter-property"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-floating-promises/jquerypromise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-floating-promises": [true, "JQueryPromise"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/bom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bom", 3 | "version": "1.0.0", 4 | "dependencies": {} 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-object-literal-type-assertion/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-object-literal-type-assertion": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-shadowed-variable/ignore-class/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadowed-variable": [true, {"class": false}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-shadowed-variable/ignore-import/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadowed-variable": [true, {"import": false}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-trailing-whitespace/ignore-jsdoc/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": [true, "ignore-jsdoc"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-class/allow-empty/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-class": [true, "allow-empty-class"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/check-parameters/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-variable": [true, "check-parameters"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-key-quotes/as-needed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-key-quotes": [true, "as-needed"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-shorthand/never/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-shorthand": [true, "never"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-readonly/only-inline-lambdas/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-readonly": [true, "only-inline-lambdas"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-null-union/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/ignore-rhs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-null-checks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/strict-null-checks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/trailing-comma/multiline-always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "trailing-comma": [true, {"multiline": "always"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/trailing-comma/singleline-always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "trailing-comma": [true, {"singleline": "always"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/trailing-comma/singleline-never/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "trailing-comma": [true, {"singleline": "never"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/triple-equals/allow-undefined-check/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "triple-equals": [true, "allow-undefined-check"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/type-literal-delimiter/one-liners-with-no-trailings/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "type-literal-delimiter": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typedef/call-signature/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "call-signature" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/config/tslint-default-severity-unspecified.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "default-severity-unspecified": { "severity": "default" } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/arrow-return-shorthand/multiline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "arrow-return-shorthand": [true, "multiline"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-shebang/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d", "Good header 2"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/max-classes-per-file/one/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-classes-per-file": [true, 1, "exclude-class-expressions"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-ordering/public-before-private/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, "public-before-private"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-ordering/static-before-instance/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, "static-before-instance"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-consecutive-blank-lines/invalid-option/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-consecutive-blank-lines": [true, "three"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-variable/check-parameters/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": [true, "check-parameters"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-inferrable-types/ignore-properties/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-inferrable-types": [true, "ignore-properties"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-submodule-imports/dynamic-imports/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-submodule-imports": [true, "@angular/core", "rxjs"] 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-trailing-whitespace/ignore-comments/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": [true, "ignore-comments"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-class/allow-static-only/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-class": [true, "allow-static-only"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/noStrictNullChecks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-type-assertion": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-void-expression/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "allowJs": true 5 | } 6 | } -------------------------------------------------------------------------------- /test/rules/object-literal-key-quotes/consistent/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-key-quotes": [true, "consistent"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/ignore-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": [true, "ignore-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-switch/min-cases-2/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-switch": [true, { 4 | "min-cases": 2 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-double/test.ts.lint: -------------------------------------------------------------------------------- 1 | var single = 'single'; 2 | ~~~~~~~~ [' should be "] 3 | var unbalancedSingleAfter = ('a) 4 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-single/test.ts.lint: -------------------------------------------------------------------------------- 1 | var single = "single"; 2 | ~~~~~~~~ [" should be '] 3 | var unbalancedSingleAfter = ("a) 4 | -------------------------------------------------------------------------------- /test/rules/semicolon/ignore-interfaces/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always", "ignore-interfaces"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-enum/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-enum"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-undefined-union/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-comparisons/allow-object-equal-comparison/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/allow-string-order-comparison/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typedef/arrow-parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "arrow-parameter" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/variable-name/allow-leading-underscore/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-leading-underscore"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/variable-name/const-only-for-caps/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "require-const-for-all-caps"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/custom-rule-rule-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": "../custom-rules-2", 3 | "rules": { 4 | "no-fail": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": {}, 3 | "include": [ 4 | "src/**/*.ts", 5 | "test/**/*.ts" 6 | ] 7 | } -------------------------------------------------------------------------------- /test/files/tsconfig-resolve-json-module/index.ts: -------------------------------------------------------------------------------- 1 | import settings from "./test.json"; 2 | // tslint:disable-next-line:no-console 3 | console.log(settings.dry); 4 | -------------------------------------------------------------------------------- /test/rules/completed-docs/accessors/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [ 4 | true, 5 | "properties" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/completed-docs/variables/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [ 4 | true, 5 | "variables" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-single-line/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d", "Good header 2"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-use-strict/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d", "Good header 2"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/failure/CRLF/test.ts.fix: -------------------------------------------------------------------------------- 1 | // this line uses CRLF 2 | // this line uses CRLF 3 | // this line uses CRLF 4 | // this line uses CRLF 5 | -------------------------------------------------------------------------------- /test/rules/member-ordering/fields-first/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { "order": "fields-first" }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-ordering/statics-first/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { "order": "statics-first" }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-trailing-whitespace/skip-blank-lines/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": [true, "ignore-blank-lines"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/strict/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2015", 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/ignore-pattern/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-variable": [true, {"ignore-pattern": "^[_R]"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-void-expression/ignore-arrow-function-shorthand/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/shorthand-first/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": [true, "shorthand-first"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/only-arrow-functions/allow-declarations/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "only-arrow-functions": [true, "allow-declarations"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/named-imports-any/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true, {"named-imports-order": "any"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-function-over-method/allow-public/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-function-over-method": [true, "allow-public"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/double-avoid-template/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double", "avoid-escape", "avoid-template"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/single-avoid-template/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single", "avoid-escape", "avoid-template"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-number/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-number"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-string/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-string"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-string-expressions/disallow-empty-types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/no-strict-null-checks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // strictNullChecks not enabled 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/typedef/array-destructuring/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "array-destructuring" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/unnecessary-else/allow-else-if/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-else": [true, { "allow-else-if": true }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/variable-name/allow-trailing-underscore/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-trailing-underscore"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/success/CRLF/test.ts.lint: -------------------------------------------------------------------------------- 1 | // this line uses CRLF 2 | // this line uses CRLF 3 | // this line uses CRLF 4 | // this line uses CRLF 5 | -------------------------------------------------------------------------------- /test/rules/member-ordering/variables-before-functions/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, "variables-before-functions"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-magic-numbers/ignore-jsx/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": [true, { 4 | "ignore-jsx": true 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-promise-as-boolean/custom-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "es6" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/no-promise-as-boolean/es6-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "es6" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/no-shadowed-variable/ignore-underscore/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadowed-variable": [true, {"underscore": false}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-class/allow-constructor-only/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-class": [true, "allow-constructor-only"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/strict/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-type-assertion": [true, "AnyDuringMigration"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-expression/allow-fast-null-checks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-expression": [true, "allow-fast-null-checks"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/react1.tsx.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.1.0 < 2.9.0 2 | 3 | import * as React from "react"; 4 | 5 | console.log(
); 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/ignore-blank-lines/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": [true, "ignore-blank-lines"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/locale-compare/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": [true, "locale-compare"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/only-arrow-functions/allow-named-functions/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "only-arrow-functions": [true, "allow-named-functions"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/module-source-path/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true, {"module-source-path": "basename"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-conditional-expression/check-else-if/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-conditional-expression": [true, "check-else-if"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-function-over-method/allow-protected/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-function-over-method": [true, "allow-protected"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/semicolon/ignore-bound-class-methods/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always", "ignore-bound-class-methods"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/semicolon/strict-bound-class-methods/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always", "strict-bound-class-methods"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-boolean-undefined-union/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-enum/test.ts.lint: -------------------------------------------------------------------------------- 1 | declare function get