├── .circleci └── config.yml ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmignore ├── .nycrc ├── .prettierrc ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bin └── tslint ├── docs ├── .circle │ └── config.yml ├── Gemfile ├── Gemfile.lock ├── _config.yml ├── _data │ ├── develop_sidebar.json │ └── usage_sidebar.json ├── _includes │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── peer_dependencies.md │ ├── rule_list.html │ └── sidebar.html ├── _layouts │ ├── default.html │ ├── formatter.html │ ├── page.html │ ├── post.html │ └── rule.html ├── _posts │ ├── 2015-12-10-a-new-tslint-website.md │ ├── 2016-03-31-sharable-configurations-rules.md │ └── 2016-11-17-new-for-4.0.md ├── _sass │ ├── _base.scss │ ├── _cayman.scss │ ├── _normalize.scss │ └── _syntax-highlighting.scss ├── css │ └── main.scss ├── develop │ ├── contributing │ │ └── index.md │ ├── custom-formatters │ │ └── index.md │ ├── custom-rules │ │ ├── index.md │ │ ├── performance-tips.md │ │ └── walker-design.md │ ├── docs │ │ └── index.md │ └── testing-rules │ │ └── index.md ├── feed.xml ├── formatters │ └── index.md ├── index.md ├── news │ └── index.html ├── rules │ └── index.md └── usage │ ├── cli │ └── index.md │ ├── configuration │ └── index.md │ ├── library │ └── index.md │ ├── rule-flags │ └── index.md │ ├── third-party-tools │ └── index.md │ └── type-checking │ └── index.md ├── package.json ├── scripts ├── buildDocs.ts ├── generate-changelog.ts ├── npmPublish.sh ├── tsconfig.json └── verifyCleanLockfile.sh ├── src ├── configs │ ├── all.ts │ ├── latest.ts │ └── recommended.ts ├── configuration.ts ├── custom-types.d.ts ├── enableDisableRules.ts ├── error.ts ├── files │ ├── reading.ts │ └── resolution.ts ├── formatterLoader.ts ├── formatters.ts ├── formatters │ ├── checkstyleFormatter.ts │ ├── codeFrameFormatter.ts │ ├── fileslistFormatter.ts │ ├── index.ts │ ├── jsonFormatter.ts │ ├── junitFormatter.ts │ ├── msbuildFormatter.ts │ ├── pmdFormatter.ts │ ├── proseFormatter.ts │ ├── stylishFormatter.ts │ ├── tapFormatter.ts │ ├── verboseFormatter.ts │ └── vsoFormatter.ts ├── index.ts ├── language │ ├── formatter │ │ ├── abstractFormatter.ts │ │ └── formatter.ts │ ├── rule │ │ ├── abstractRule.ts │ │ ├── optionallyTypedRule.ts │ │ ├── rule.ts │ │ └── typedRule.ts │ ├── typeUtils.ts │ ├── utils.ts │ └── walker │ │ ├── blockScopeAwareRuleWalker.ts │ │ ├── index.ts │ │ ├── programAwareRuleWalker.ts │ │ ├── ruleWalker.ts │ │ ├── scopeAwareRuleWalker.ts │ │ ├── syntaxWalker.ts │ │ ├── walkContext.ts │ │ └── walker.ts ├── linter.ts ├── ruleLoader.ts ├── rules.ts ├── rules │ ├── adjacentOverloadSignaturesRule.ts │ ├── alignRule.ts │ ├── arrayTypeRule.ts │ ├── arrowParensRule.ts │ ├── arrowReturnShorthandRule.ts │ ├── awaitPromiseRule.ts │ ├── banCommaOperatorRule.ts │ ├── banRule.ts │ ├── banTsIgnoreRule.ts │ ├── banTypesRule.ts │ ├── binaryExpressionOperandOrderRule.ts │ ├── callableTypesRule.ts │ ├── classNameRule.ts │ ├── code-examples │ │ ├── arrowReturnShorthand.examples.ts │ │ ├── banTsIgnore.examples.ts │ │ ├── className.examples.ts │ │ ├── curly.examples.ts │ │ ├── functionConstructor.examples.ts │ │ ├── noAny.examples.ts │ │ ├── noAsyncWithoutAwait.examples.ts │ │ ├── noEmptyInterface.examples.ts │ │ ├── noObjectLiteralTypeAssertion.examples.ts │ │ ├── noPromiseAsBoolean.examples.ts │ │ ├── noSparseArrays.examples.ts │ │ ├── noStringThrowRule.examples.ts │ │ ├── noUnnecessaryCallbackWrapper.examples.ts │ │ ├── noUseBeforeDeclare.examples.ts │ │ ├── objectLiteralSortKeys.examples.ts │ │ ├── oneVariablePerDeclaration.examples.ts │ │ ├── onlyArrowFunctions.examples.ts │ │ ├── preferTemplate.examples.ts │ │ ├── preferWhile.examples.ts │ │ ├── radix.examples.ts │ │ ├── staticThis.examples.ts │ │ ├── strictComparisons.examples.ts │ │ ├── switchDefault.examples.ts │ │ ├── typedef.examples.ts │ │ ├── unnecessaryElse.examples.ts │ │ └── useIsnan.examples.ts │ ├── commentFormatRule.ts │ ├── commentTypeRule.ts │ ├── completed-docs │ │ ├── blockExclusion.ts │ │ ├── classExclusion.ts │ │ ├── constructorExclusion.ts │ │ ├── exclusion.ts │ │ ├── exclusionDescriptors.ts │ │ ├── exclusions.ts │ │ └── tagExclusion.ts │ ├── completedDocsRule.ts │ ├── curlyRule.ts │ ├── cyclomaticComplexityRule.ts │ ├── deprecationRule.ts │ ├── encodingRule.ts │ ├── eoflineRule.ts │ ├── fileHeaderRule.ts │ ├── fileNameCasingRule.ts │ ├── forinRule.ts │ ├── functionConstructorRule.ts │ ├── importBlacklistRule.ts │ ├── importSpacingRule.ts │ ├── incrementDecrementRule.ts │ ├── indentRule.ts │ ├── interfaceNameRule.ts │ ├── interfaceOverTypeLiteralRule.ts │ ├── invalidVoidRule.ts │ ├── jsdocFormatRule.ts │ ├── labelPositionRule.ts │ ├── linebreakStyleRule.ts │ ├── matchDefaultExportNameRule.ts │ ├── maxClassesPerFileRule.ts │ ├── maxFileLineCountRule.ts │ ├── maxLineLengthRule.ts │ ├── memberAccessRule.ts │ ├── memberOrderingRule.ts │ ├── newParensRule.ts │ ├── newlineBeforeReturnRule.ts │ ├── newlinePerChainedCallRule.ts │ ├── noAngleBracketTypeAssertionRule.ts │ ├── noAnyRule.ts │ ├── noArgRule.ts │ ├── noAsyncWithoutAwaitRule.ts │ ├── noBitwiseRule.ts │ ├── noBooleanLiteralCompareRule.ts │ ├── noConditionalAssignmentRule.ts │ ├── noConsecutiveBlankLinesRule.ts │ ├── noConsoleRule.ts │ ├── noConstructRule.ts │ ├── noDebuggerRule.ts │ ├── noDefaultExportRule.ts │ ├── noDefaultImportRule.ts │ ├── noDuplicateImportsRule.ts │ ├── noDuplicateSuperRule.ts │ ├── noDuplicateSwitchCaseRule.ts │ ├── noDuplicateVariableRule.ts │ ├── noDynamicDeleteRule.ts │ ├── noEmptyInterfaceRule.ts │ ├── noEmptyRule.ts │ ├── noEvalRule.ts │ ├── noFloatingPromisesRule.ts │ ├── noForInArrayRule.ts │ ├── noForInRule.ts │ ├── noImplicitDependenciesRule.ts │ ├── noImportSideEffectRule.ts │ ├── noInferrableTypesRule.ts │ ├── noInferredEmptyObjectTypeRule.ts │ ├── noInternalModuleRule.ts │ ├── noInvalidTemplateStringsRule.ts │ ├── noInvalidThisRule.ts │ ├── noIrregularWhitespaceRule.ts │ ├── noMagicNumbersRule.ts │ ├── noMergeableNamespaceRule.ts │ ├── noMisusedNewRule.ts │ ├── noNamespaceRule.ts │ ├── noNonNullAssertionRule.ts │ ├── noNullKeywordRule.ts │ ├── noNullUndefinedUnionRule.ts │ ├── noObjectLiteralTypeAssertionRule.ts │ ├── noParameterPropertiesRule.ts │ ├── noParameterReassignmentRule.ts │ ├── noPromiseAsBooleanRule.ts │ ├── noRedundantJsdocRule.ts │ ├── noReferenceImportRule.ts │ ├── noReferenceRule.ts │ ├── noRequireImportsRule.ts │ ├── noRestrictedGlobalsRule.ts │ ├── noReturnAwaitRule.ts │ ├── noShadowedVariableRule.ts │ ├── noSparseArraysRule.ts │ ├── noStringLiteralRule.ts │ ├── noStringThrowRule.ts │ ├── noSubmoduleImportsRule.ts │ ├── noSwitchCaseFallThroughRule.ts │ ├── noTautologyExpressionRule.ts │ ├── noThisAssignmentRule.ts │ ├── noTrailingWhitespaceRule.ts │ ├── noUnboundMethodRule.ts │ ├── noUnnecessaryCallbackWrapperRule.ts │ ├── noUnnecessaryClassRule.ts │ ├── noUnnecessaryInitializerRule.ts │ ├── noUnnecessaryQualifierRule.ts │ ├── noUnnecessaryTypeAssertionRule.ts │ ├── noUnsafeAnyRule.ts │ ├── noUnsafeFinallyRule.ts │ ├── noUnusedExpressionRule.ts │ ├── noUnusedVariableRule.ts │ ├── noUseBeforeDeclareRule.ts │ ├── noVarKeywordRule.ts │ ├── noVarRequiresRule.ts │ ├── noVoidExpressionRule.ts │ ├── numberLiteralFormatRule.ts │ ├── objectLiteralKeyQuotesRule.ts │ ├── objectLiteralShorthandRule.ts │ ├── objectLiteralSortKeysRule.ts │ ├── oneLineRule.ts │ ├── oneVariablePerDeclarationRule.ts │ ├── onlyArrowFunctionsRule.ts │ ├── orderedImportsRule.ts │ ├── preferConditionalExpressionRule.ts │ ├── preferConstRule.ts │ ├── preferForOfRule.ts │ ├── preferFunctionOverMethodRule.ts │ ├── preferMethodSignatureRule.ts │ ├── preferObjectSpreadRule.ts │ ├── preferReadonlyRule.ts │ ├── preferSwitchRule.ts │ ├── preferTemplateRule.ts │ ├── preferWhileRule.ts │ ├── promiseFunctionAsyncRule.ts │ ├── quotemarkRule.ts │ ├── radixRule.ts │ ├── restrictPlusOperandsRule.ts │ ├── returnUndefinedRule.ts │ ├── semicolonRule.ts │ ├── spaceBeforeFunctionParenRule.ts │ ├── spaceWithinParensRule.ts │ ├── staticThisRule.ts │ ├── strictBooleanExpressionsRule.ts │ ├── strictComparisonsRule.ts │ ├── strictStringExpressionsRule.ts │ ├── strictTypePredicatesRule.ts │ ├── switchDefaultRule.ts │ ├── switchFinalBreakRule.ts │ ├── trailingCommaRule.ts │ ├── tripleEqualsRule.ts │ ├── typeLiteralDelimiterRule.ts │ ├── typedefRule.ts │ ├── typedefWhitespaceRule.ts │ ├── typeofCompareRule.ts │ ├── unifiedSignaturesRule.ts │ ├── unnecessaryBindRule.ts │ ├── unnecessaryConstructorRule.ts │ ├── unnecessaryElseRule.ts │ ├── useDefaultTypeParameterRule.ts │ ├── useIsnanRule.ts │ ├── variableNameRule.ts │ └── whitespaceRule.ts ├── runner.ts ├── test.ts ├── tsconfig.json ├── tslintCli.ts ├── utils.ts └── verify │ ├── lines.ts │ ├── lintError.ts │ └── parse.ts ├── test ├── config │ ├── package.json │ ├── relative-rules-directory │ │ └── index.js │ ├── tslint-almost-empty.json │ ├── tslint-custom-rules-uncompiled.json │ ├── tslint-custom-rules-with-dir-and-format.json │ ├── tslint-custom-rules-with-dir.json │ ├── tslint-custom-rules-with-package-fallback.json │ ├── tslint-custom-rules-with-package.json │ ├── tslint-custom-rules-with-two-dirs.json │ ├── tslint-custom-rules.json │ ├── tslint-default-severity-error.json │ ├── tslint-default-severity-off.json │ ├── tslint-default-severity-unspecified.json │ ├── tslint-default-severity-warning.json │ ├── tslint-extends-builtin.json │ ├── tslint-extends-default-severity-only-in-extended.json │ ├── tslint-extends-default-severity-precedence.json │ ├── tslint-extends-default-severity.json │ ├── tslint-extends-invalid.json │ ├── tslint-extends-package-array.json │ ├── tslint-extends-package-boolean.json │ ├── tslint-extends-package-no-mod.json │ ├── tslint-extends-package-partial.json │ ├── tslint-extends-package-two-levels.json │ ├── tslint-extends-package-warning.json │ ├── tslint-extends-package.json │ ├── tslint-extends-relative.json │ ├── tslint-invalid.json │ ├── tslint-invalid.yaml │ ├── tslint-with-bom.json │ ├── tslint-with-comments.json │ ├── tslint-with-comments.yaml │ ├── tslint-with-jsrules.json │ └── tslint-with-merge.yaml ├── configurationTests.ts ├── executable │ ├── executableTests.ts │ ├── npm-like-executable │ └── npm-like-executable.cmd ├── external │ ├── tslint-test-config-non-relative │ │ ├── index.js │ │ ├── package.json │ │ └── tslint.json │ ├── tslint-test-config │ │ ├── index.js │ │ ├── package.json │ │ └── tslint.json │ ├── tslint-test-custom-formatter │ │ ├── formatter.js │ │ └── package.json │ └── tslint-test-custom-rules │ │ ├── package.json │ │ ├── rules │ │ ├── index.js │ │ ├── ruleOneRule.js │ │ ├── ruleThreeRule.js │ │ └── ruleTwoRule.js │ │ └── tslint.json ├── files │ ├── .gitattributes │ ├── allow-js-exclude-node-modules │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── config-exclude │ │ ├── excluded.ts │ │ ├── excluded1.ts │ │ ├── included.ts │ │ ├── subdir │ │ │ ├── excluded.ts │ │ │ ├── excluded2.ts │ │ │ └── tslint-extending.json │ │ ├── tslint-exclude-many.json │ │ └── tslint-exclude-one.json │ ├── config-findup │ │ ├── contains-config │ │ │ └── tslint.json │ │ ├── no-config │ │ │ └── index.test.ts │ │ ├── tslint.json │ │ ├── yaml-config │ │ │ ├── tslint.json │ │ │ ├── tslint.yaml │ │ │ └── tslint.yml │ │ └── yml-config │ │ │ ├── tslint.yaml │ │ │ └── tslint.yml │ ├── custom-rule-cli-rule-test │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── custom-rule-rule-test │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── custom-rules-2 │ │ └── noFailRule.js │ ├── custom-rules │ │ ├── alwaysFailRule.js │ │ └── testUncompiledRule.ts │ ├── fixes-test │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── formatters │ │ ├── codeFrameFormatter.test.ts │ │ ├── externalFormatter.test.ts │ │ ├── fileslistFormatter.test.ts │ │ ├── jsonFormatter.test.ts │ │ ├── msbuildFormatter.test.ts │ │ ├── pmdFormatter.test.ts │ │ ├── proseFormatter.test.ts │ │ ├── simple.js │ │ ├── stylishFormatter.test.ts │ │ ├── tapFormatter.test.ts │ │ └── vsoFormatter.test.ts │ ├── incorrect-fixes-test │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── incorrect-rule-test-copy │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── incorrect-rule-test │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── multiple-excludes │ │ ├── invalid.test.ts │ │ ├── invalid2.test.ts │ │ ├── tslint.json │ │ └── valid.test.ts │ ├── multiple-fixes-test │ │ └── tslint.json │ ├── print-config │ │ ├── a.ts │ │ └── b.ts │ ├── project-multiple-fixes │ │ ├── .gitignore │ │ ├── after.test.ts │ │ ├── before.test.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── tsconfig-allow-js │ │ ├── testfile.test.js │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── valid.test.ts │ ├── tsconfig-extends-relative │ │ ├── src │ │ │ └── src.test.ts │ │ ├── test │ │ │ ├── test.test.ts │ │ │ └── tsconfig.json │ │ ├── tsconfig.json │ │ ├── tslint-fail.json │ │ └── tslint-ok.json │ ├── tsconfig-invalid │ │ ├── empty-files.json │ │ ├── no-match.json │ │ └── syntax-error.json │ ├── tsconfig-no-ts-files │ │ ├── only.d.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── tsconfig-resolve-json-module │ │ ├── index.ts │ │ ├── test.json │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── tsconfig-test │ │ ├── good.test.ts │ │ ├── other.test.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ └── typed-rule │ │ ├── fail.test.ts │ │ ├── tsconfig.json │ │ └── tslint.json ├── formatters │ ├── checkstyleFormatterTests.ts │ ├── codeFrameFormatterTests.ts │ ├── externalFormatterTests.ts │ ├── fileslistFormatterTests.ts │ ├── jsonFormatterTests.ts │ ├── junitFormatterTests.ts │ ├── msbuildFormatterTests.ts │ ├── pmdFormatterTests.ts │ ├── proseFormatterTests.ts │ ├── stylishFormatterTests.ts │ ├── tapFormatterTests.ts │ ├── utils.ts │ ├── verboseFormatterTests.ts │ └── vsoFormatterTests.ts ├── lint.ts ├── linterTests.ts ├── rule-tester │ ├── linesTests.ts │ ├── parseTests.ts │ └── testData.ts ├── ruleLoaderTests.ts ├── ruleTestRunner.ts ├── ruleTests.ts ├── rules │ ├── _integration │ │ ├── enable-disable │ │ │ ├── test.ts.lint │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ ├── error-format │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── react │ │ │ ├── invalid.tsx.lint │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ └── typescript-version │ │ │ ├── correct.js.lint │ │ │ ├── correct.ts.fix │ │ │ ├── correct.ts.lint │ │ │ ├── if-else.ts.lint │ │ │ ├── skip.js.lint │ │ │ ├── skip.ts.lint │ │ │ ├── substitution.ts.lint │ │ │ └── tslint.json │ ├── adjacent-overload-signatures │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-accessors │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── align │ │ ├── arguments │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── elements │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── members │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── parameters │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── statements │ │ │ ├── bom.ts.fix │ │ │ ├── bom.ts.lint │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── array-type │ │ ├── array-simple │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── array │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── generic │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── arrow-parens │ │ ├── ban-single-arg-parens │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── arrow-return-shorthand │ │ ├── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── multiline │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── await-promise │ │ ├── custom-promise │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── es6-promise │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── for-await-of │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── ban-comma-operator │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── ban-ts-ignore │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── ban-types │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── ban │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── binary-expression-operand-order │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── callable-types │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── class-name │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── comment-format │ │ ├── allow-trailing-lowercase │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── exceptions-pattern │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── exceptions-words │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── lower │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── test.tsx.fix │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ └── upper │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── comment-type │ │ ├── combo │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── directive │ │ │ ├── test.ts.tslint │ │ │ └── tslint.json │ │ ├── doc │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── multiline │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── single-line │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── completed-docs │ │ ├── accessors-public │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── accessors │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── constructors │ │ │ ├── overloads │ │ │ │ ├── default │ │ │ │ │ ├── test.ts.lint │ │ │ │ │ └── tslint.json │ │ │ │ └── true │ │ │ │ │ ├── test.ts.lint │ │ │ │ │ └── tslint.json │ │ │ ├── privacies │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── tags │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── defaults │ │ │ ├── edge-case │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── functions │ │ │ └── overloads-separate-docs │ │ │ │ ├── default │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ │ ├── false │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ │ └── true │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── interface-members │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── locations │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── methods │ │ │ └── overloads-separate-docs │ │ │ │ ├── default │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ │ ├── false │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ │ └── true │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── privacies-private │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── privacies-protected │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── privacies-public │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── privacies │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── tags │ │ │ ├── content │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── existence │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── types │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── variables │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── visibilities │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── curly │ │ ├── as-needed │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── defaults │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-same-line │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── cyclomatic-complexity │ │ ├── defaultThreshold │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── invalidThreshold │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── specifiedThreshold │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── deprecation │ │ ├── other.test.ts │ │ ├── other2.test.ts │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── encoding │ │ ├── tslint.json │ │ ├── utf16be.ts.lint │ │ ├── utf16le.ts.lint │ │ ├── utf8-bom.ts.lint │ │ └── utf8.ts.lint │ ├── eofline │ │ ├── comment.ts.lint │ │ ├── disabled.ts.lint │ │ ├── empty.ts.lint │ │ ├── invalid.ts.fix │ │ ├── invalid.ts.lint │ │ ├── only-whitespace.ts.fix │ │ ├── only-whitespace.ts.lint │ │ ├── tslint.json │ │ ├── valid.ts.lint │ │ └── whitespace.ts.lint │ ├── file-header │ │ ├── bad-newline │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── bad-shebang │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── bad-single-line │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── bad-single-newline │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── bad-use-strict │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── bad │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── test2.ts.fix │ │ │ ├── test2.ts.lint │ │ │ └── tslint.json │ │ ├── empty-file │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good-allow-single-line-comments │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good-newline │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good-shebang │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good-single-line │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── good-use-strict │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── good │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── file-name-casing │ │ ├── camel-case │ │ │ ├── camelCase.ts.lint │ │ │ ├── no-camel-case.ts.lint │ │ │ └── tslint.json │ │ ├── complex │ │ │ ├── ComponentName.tsx.lint │ │ │ ├── InvalidNonComponentName.ts.lint │ │ │ ├── invalid-component-name.tsx.lint │ │ │ ├── my-button.component.ts.lint │ │ │ ├── nonComponentName.ts.lint │ │ │ └── tslint.json │ │ ├── file-matcher │ │ │ ├── PascalCase.ts.lint │ │ │ ├── camelCase.ts.lint │ │ │ ├── notPascalCase.ts.lint │ │ │ ├── not_camel_case.ts.lint │ │ │ ├── not_kebab_case.tsx.lint │ │ │ └── tslint.json │ │ ├── ignore │ │ │ ├── complaint.tsx.lint │ │ │ ├── file.ts.lint │ │ │ └── tslint.json │ │ ├── invalid-option │ │ │ ├── snake_case.ts.lint │ │ │ └── tslint.json │ │ ├── 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 │ │ │ ├── no-snake-case.ts.lint │ │ │ ├── snake_case.ts.lint │ │ │ └── tslint.json │ ├── forin │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── function-constructor │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── import-blacklist │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── import-spacing │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── increment-decrement │ │ ├── allow-post │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── indent │ │ ├── spaces-2 │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ ├── spaces-4 │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── tabs-2 │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── tabs-4 │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── interface-name │ │ ├── always-prefix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── never-prefix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── interface-over-type-literal │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── invalid-void │ │ ├── allow-generics │ │ │ ├── false │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── true │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── whitelist │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── jsdoc-format │ │ ├── check-multiline-start │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── jsdoc-bom.ts.lint │ │ │ ├── jsdoc-windows.ts.lint │ │ │ ├── jsdoc.ts.lint │ │ │ └── tslint.json │ ├── label-position │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── linebreak-style │ │ ├── emptyFile │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── failure │ │ │ ├── CRLF │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── LF │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ └── success │ │ │ ├── CRLF │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ │ └── LF │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── match-default-export-name │ │ ├── anonymous.test.ts │ │ ├── named.test.ts │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── max-classes-per-file │ │ ├── one │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── two │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── max-file-line-count │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── disabled │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── max-line-length │ │ ├── check-strings-and-regex │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── member-access │ │ ├── accessor │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── constructor │ │ ├── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── no-public │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── parameter-property │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── member-ordering │ │ ├── alphabetize-nested │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── alphabetize │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── custom-categories │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── custom │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── fields-first │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── fix-trivia │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── instance-sandwich │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── mix-old-options │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── omit-access-modifier │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── public-before-private │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── static-before-instance │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── statics-first │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── variables-before-functions │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── new-parens │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── newline-before-return │ │ └── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── test.tsx.fix │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ ├── newline-per-chained-call │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-angle-bracket-type-assertion │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-any │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-rest-args │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-arg │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-async-without-await │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-bitwise │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-boolean-literal-compare │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-conditional-assignment │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-consecutive-blank-lines │ │ ├── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── invalid-option │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── multiple │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-console │ │ ├── all │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── list │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-construct │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-debugger │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-default-export │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-default-import │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── fromModules │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-duplicate-imports │ │ ├── allow-namespace-imports │ │ │ ├── test.d.ts.lint │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.d.ts.lint │ │ │ ├── test.ts.lint │ │ │ ├── test2.d.ts.lint │ │ │ ├── test3.d.ts.lint │ │ │ └── tslint.json │ ├── no-duplicate-super │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-duplicate-switch-case │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-duplicate-variable │ │ ├── check-parameters │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-dynamic-delete │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-empty-interface │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-empty │ │ ├── allow-empty-catch │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-empty-functions │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-eval │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-floating-promises │ │ ├── jquerypromise │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── promises │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-for-in-array │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-for-in │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-implicit-dependencies │ │ ├── default │ │ │ ├── bom │ │ │ │ ├── package.json │ │ │ │ └── test.ts.lint │ │ │ ├── builtin-only.ts.lint │ │ │ ├── malformed │ │ │ │ ├── package.json │ │ │ │ └── tets.ts.lint │ │ │ ├── nested-package │ │ │ │ ├── package.json │ │ │ │ └── test.ts.lint │ │ │ ├── subdir │ │ │ │ └── test.ts.lint │ │ │ ├── test.js.lint │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── dev │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── optional │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── package.json │ │ ├── whitelist-with-dev │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── whitelist │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-import-side-effect │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-module │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-inferrable-types │ │ ├── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-params │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-properties │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-inferred-empty-object-type │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-internal-module │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-invalid-template-strings │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-invalid-this │ │ └── enabled │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-irregular-whitespace │ │ ├── test.builder.ts │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-magic-numbers │ │ ├── allowed-numbers │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── custom │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── default-jsx │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-jsx │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ ├── no-mergeable-namespace │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-misused-new │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-namespace │ │ ├── allow-declarations │ │ │ ├── test.d.ts.lint │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.d.ts.lint │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-non-null-assertion │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-null-keyword │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-null-undefined-union │ │ ├── test.ts.lint │ │ ├── ts350.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-object-literal-type-assertion │ │ ├── allow-arguments │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-parameter-properties │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-parameter-reassignment │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-promise-as-boolean │ │ ├── custom-promise │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── es6-promise │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-redundant-jsdoc │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-reference-import │ │ ├── test.d.ts.lint │ │ ├── ts240.d.ts.lint │ │ └── tslint.json │ ├── no-reference │ │ ├── test.ts.lint │ │ ├── ts240.ts.lint │ │ └── tslint.json │ ├── no-require-imports │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-restricted-globals │ │ ├── custom-global.d.ts │ │ ├── foo.d.ts │ │ ├── namespace.ts.lint │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-return-await │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-shadowed-variable │ │ ├── default │ │ │ ├── ambient.d.ts.lint │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-class │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-import │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-underscore │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── temporal-dead-zone │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-sparse-arrays │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-string-literal │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-string-throw │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-submodule-imports │ │ ├── dynamic-imports │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── static-imports │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-switch-case-fall-through │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-tautology-expression │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-this-assignment │ │ ├── allow-destructuring │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allowed-names │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-trailing-whitespace │ │ ├── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-comments │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-jsdoc │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-template-strings │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── skip-blank-lines │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── zero-width-no-break-space │ │ │ ├── test.ts.lint │ │ │ ├── test2.ts.lint │ │ │ └── tslint.json │ ├── no-unbound-method │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ ├── test.tsx.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── ignore-static │ │ │ ├── test.tsx.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── whitelist │ │ │ ├── test.tsx.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-unnecessary-callback-wrapper │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-unnecessary-class │ │ ├── allow-constructor-only │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-empty │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-static-only │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-unnecessary-initializer │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-unnecessary-qualifier │ │ ├── arguments.ts.lint │ │ ├── b.test.ts │ │ ├── test-global-2.ts.lint │ │ ├── test-global.ts.fix │ │ ├── test-global.ts.lint │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── no-unnecessary-type-assertion │ │ ├── noStrictNullChecks │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── strict │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── strictNullChecks │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-unsafe-any │ │ ├── default │ │ │ ├── commonjsModule.ts │ │ │ ├── es6Module.ts │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── jsx │ │ │ ├── test.tsx.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── unknown │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-unsafe-finally │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-unused-expression │ │ ├── allow-fast-null-checks │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-new │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-tagged-template │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── no-unused-variable │ │ ├── check-parameters │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── default │ │ │ ├── class.ts.lint │ │ │ ├── false-positives.ts.lint │ │ │ ├── function.ts.lint │ │ │ ├── import.ts.fix │ │ │ ├── import.ts.lint │ │ │ ├── node_modules │ │ │ │ ├── a.ts │ │ │ │ ├── react.ts │ │ │ │ └── react │ │ │ │ │ └── addons.ts │ │ │ ├── react-addons1.tsx.lint │ │ │ ├── react-addons2.tsx.lint │ │ │ ├── react-addons3.tsx.lint │ │ │ ├── react1.tsx.lint │ │ │ ├── react2.tsx.lint │ │ │ ├── react3.tsx.lint │ │ │ ├── react4.tsx.lint │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── var.ts.lint │ │ ├── ignore-pattern │ │ │ ├── a.test.ts │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── var.ts.lint │ │ └── type-checked │ │ │ ├── a.test.ts │ │ │ ├── destructuring.ts.lint │ │ │ ├── some.test.ts │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── no-use-before-declare │ │ ├── $.ts │ │ ├── ImportAliasSecond.ts │ │ ├── ImportAliasWithComment.ts │ │ ├── ImportRegularAlias.ts │ │ ├── ImportWithLineBreaks.ts │ │ ├── InterfaceFile.ts │ │ ├── lib.ts │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── underscore.ts │ ├── no-var-keyword │ │ ├── global.d.ts.lint │ │ ├── module.d.ts.lint │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-var-requires │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── no-void-expression │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── ignore-arrow-function-shorthand │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── number-literal-format │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── object-literal-key-quotes │ │ ├── always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── as-needed │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── consistent-as-needed │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── consistent │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── object-literal-shorthand │ │ ├── always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── never │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── onlyMethods │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── object-literal-sort-keys │ │ ├── default │ │ │ ├── crlf.ts.lint │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-blank-lines │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-case │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── locale-compare │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── match-declaration-order-only │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── match-declaration-order │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── shorthand-first │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── one-line │ │ ├── all │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── no-whitespace │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── none │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── one-variable-per-declaration │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── ignore-for-loop │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── only-arrow-functions │ │ ├── allow-declarations │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-named-functions │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── ordered-imports │ │ ├── case-insensitive-legacy │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── case-insensitive │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── grouped-imports │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── groups-complex │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── groups-shared-order │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── groups-string-list │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── groups-unmatched │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── import-sources-any │ │ │ ├── default │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── grouped-imports │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── inside-module-declaration │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── lowercase-first │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── module-source-path │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── named-imports-any │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── standalone-grouped-import │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── prefer-conditional-expression │ │ ├── check-else-if │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── prefer-const │ │ ├── default │ │ │ ├── ambient.d.ts.lint │ │ │ ├── global.ts.lint │ │ │ ├── spread.ts.lint │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── destructuring-all │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── prefer-for-of │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── prefer-function-over-method │ │ ├── allow-protected │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-public-and-protected │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-public │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── prefer-method-signature │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── prefer-object-spread │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── prefer-readonly │ │ ├── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── only-inline-lambdas │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── prefer-switch │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── min-cases-2 │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── prefer-template │ │ ├── allow-single-concat │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── prefer-while │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── promise-function-async │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── quotemark │ │ ├── backtick │ │ │ ├── test-post-2.7.1-syntax.ts.fix │ │ │ ├── test-post-2.7.1-syntax.ts.lint │ │ │ ├── test-pre-2.7.1-syntax.ts.fix │ │ │ ├── test-pre-2.7.1-syntax.ts.lint │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── double-avoid-escape │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── double-avoid-template │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── double │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── invalid-double │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── invalid-single │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── jsx-double │ │ │ ├── test.tsx.fix │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ ├── jsx-single │ │ │ ├── test.tsx.fix │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ │ ├── single-avoid-escape │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── single-avoid-template │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── single │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── test.tsx.lint │ │ │ └── tslint.json │ ├── radix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── restrict-plus-operands │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── esnext-bigint │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── return-undefined │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── pre-ts-3.6 │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── semicolon │ │ ├── always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── enabled │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-bound-class-methods │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ignore-interfaces │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── never │ │ │ ├── eof1.ts.lint │ │ │ ├── eof2.ts.lint │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── strict-bound-class-methods │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── space-before-function-paren │ │ ├── always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── mixed │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── never │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── space-within-parens │ │ ├── force-one-space │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── force-two-spaces │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── no-space │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── static-this │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── strict-boolean-expressions │ │ ├── allow-boolean-undefined-union │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-enum │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-mix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-null-union │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-number │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-string │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-undefined-union │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── default │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── ignore-rhs │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── no-allow-mix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── no-null-checks-allow-null-union │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── no-null-checks-allow-number-string │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── no-null-checks │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── strict-comparisons │ │ ├── allow-object-equal-comparison │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── allow-string-order-comparison │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── strict-string-expressions │ │ ├── allow-empty-types │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── disallow-empty-types │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── strict-type-predicates │ │ ├── no-strict-null-checks │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── strict-null-checks │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── unknown │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ ├── switch-default │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── switch-final-break │ │ ├── always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── trailing-comma │ │ ├── multiline-always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── multiline-custom │ │ │ ├── always │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── ignore │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── mixed │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── never │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── multiline-never │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── singleline-always │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── singleline-custom │ │ │ ├── always │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── ignore │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── mixed │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── never │ │ │ │ ├── test.ts.fix │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── singleline-never │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── spec-compliant │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── triple-equals │ │ ├── allow-null-check │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── allow-undefined-check │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── type-literal-delimiter │ │ ├── one-liners-with-no-trailings │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── one-liners-with-trailings │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── typedef-whitespace │ │ ├── both │ │ │ ├── nospace │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── onespace │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── space │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── left │ │ │ ├── nospace │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ ├── onespace │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ │ └── space │ │ │ │ ├── test.ts.lint │ │ │ │ └── tslint.json │ │ ├── none │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── right │ │ │ ├── nospace │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ │ ├── onespace │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ │ └── space │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── typedef │ │ ├── all │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── array-destructuring │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── arrow-call-signature-and-parameter │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── arrow-call-signature │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── arrow-parameter │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── call-signature │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── member-variable-declaration │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── none │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── object-destructuring │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── parameter │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── variable-declaration-ignore-function │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── variable-declaration │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── typeof-compare │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── unified-signatures │ │ ├── test.d.ts.lint │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── unnecessary-bind │ │ ├── typed │ │ │ ├── test.ts.lint │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ └── untyped │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── unnecessary-constructor │ │ ├── check-super-calls │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.fix │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── unnecessary-else │ │ ├── allow-else-if │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ ├── use-default-type-parameter │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── use-isnan │ │ ├── test.ts.lint │ │ └── tslint.json │ ├── variable-name │ │ ├── allow-leading-trailing-underscore │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-leading-underscore │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-pascal-case │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-snake-case │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── allow-trailing-underscore │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── ban-keywords │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ ├── const-only-for-caps │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ │ └── default │ │ │ ├── test.ts.lint │ │ │ └── tslint.json │ └── whitespace │ │ ├── all │ │ ├── bom.ts.lint │ │ ├── import-type.lint │ │ ├── import.ts.lint │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ │ ├── check-postbrace │ │ ├── test.ts.fix │ │ ├── test.ts.lint │ │ └── tslint.json │ │ ├── check-separator │ │ ├── test.ts.lint │ │ └── tslint.json │ │ └── none │ │ ├── test.ts.lint │ │ └── tslint.json ├── runner │ └── runnerTests.ts ├── tsconfig.json ├── tslint.json ├── utils.ts └── utilsTests.ts ├── tslint-vscode.json ├── tslint.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "trailingComma": "all" 5 | } 6 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "identifier": "compile_tests", 5 | "type": "npm", 6 | "script": "compile:test", 7 | "problemMatcher": ["$tsc"] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/custom-types.d.ts: -------------------------------------------------------------------------------- 1 | declare module "builtin-modules" { 2 | let result: string[]; 3 | export = result; 4 | } 5 | -------------------------------------------------------------------------------- /test/config/relative-rules-directory/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/config/relative-rules-directory/index.js -------------------------------------------------------------------------------- /test/config/tslint-almost-empty.json: -------------------------------------------------------------------------------- 1 | { "jsRules": {}, "rules": {} } 2 | -------------------------------------------------------------------------------- /test/config/tslint-custom-rules-uncompiled.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": "../files/custom-rules/", 3 | "rules": { 4 | "test-uncompiled": { 5 | "severity": "error" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/config/tslint-custom-rules-with-dir.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": "../files/custom-rules/", 3 | "jsRules": { 4 | "always-fail": { 5 | "severity": "error" 6 | } 7 | }, 8 | "rules": { 9 | "always-fail": { 10 | "severity": "error" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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/config/tslint-custom-rules.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsRules": { 3 | "always-fail": { 4 | "options": [1], 5 | "severity": "error" 6 | } 7 | }, 8 | "rules": { 9 | "always-fail": { 10 | "options": 1, 11 | "severity": "error" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/config/tslint-default-severity-error.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "rules": { 4 | "default-severity-error": { "severity": "default" } 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/config/tslint-default-severity-off.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "off", 3 | "rules": { 4 | "default-severity-off": { "severity": "default" } 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/config/tslint-default-severity-unspecified.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "default-severity-unspecified": { "severity": "default" } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/config/tslint-default-severity-warning.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "warning", 3 | "rules": { 4 | "default-severity-warning": { "severity": "default" } 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/config/tslint-extends-builtin.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:latest", 3 | "jsRules": { 4 | "no-eval": { 5 | "severity": "none" 6 | } 7 | }, 8 | "rules": { 9 | "no-eval": { 10 | "severity": "none" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/config/tslint-extends-default-severity-only-in-extended.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tslint-extends-default-severity.json", 3 | "rules": { 4 | "default-severity-only-in-extended": { "severity": "default" } 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/config/tslint-extends-default-severity-precedence.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "./tslint-default-severity-error.json", 4 | "./tslint-default-severity-warning.json", 5 | "./tslint-default-severity-off.json", 6 | "./tslint-default-severity-unspecified.json" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/config/tslint-extends-default-severity.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ "./tslint-default-severity-unspecified.json", "./tslint-default-severity-error.json" ], 3 | "defaultSeverity": "warning", 4 | "rules": { 5 | "default-severity-warning": { "severity": "default" } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/config/tslint-extends-invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tslint-invalid.json" 3 | } 4 | -------------------------------------------------------------------------------- /test/config/tslint-extends-package-boolean.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-test-custom-rules", 3 | "jsRules": { 4 | "rule-two": true, 5 | "rule-three": false 6 | }, 7 | "rules": { 8 | "rule-two": true, 9 | "rule-three": false 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/config/tslint-extends-package-no-mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-test-custom-rules" 3 | } 4 | -------------------------------------------------------------------------------- /test/config/tslint-extends-package-partial.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-test-custom-rules", 3 | "jsRules": { 4 | "always-fail": { 5 | "severity": "warning" 6 | } 7 | }, 8 | "rules": { 9 | "always-fail": { 10 | "options": [2] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/config/tslint-extends-package-warning.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-test-custom-rules", 3 | "jsRules": { 4 | "always-fail": { 5 | "severity": "warning" 6 | } 7 | }, 8 | "rules": { 9 | "always-fail": { 10 | "severity": "warning" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/config/tslint-extends-relative.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tslint-custom-rules-with-two-dirs.json", 3 | "jsRules": { 4 | "always-fail": { 5 | "severity": "none" 6 | } 7 | }, 8 | "rules": { 9 | "always-fail": { 10 | "severity": "none" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/config/tslint-invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | -------------------------------------------------------------------------------- /test/config/tslint-invalid.yaml: -------------------------------------------------------------------------------- 1 | {{ hello I am invalid } 2 | -------------------------------------------------------------------------------- /test/config/tslint-with-bom.json: -------------------------------------------------------------------------------- 1 | { "jsRules": { }, "rules": { } } -------------------------------------------------------------------------------- /test/config/tslint-with-jsrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsRules": { 3 | "rule": { 4 | "severity": "error" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /test/executable/npm-like-executable.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\..\bin\tslint" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\..\bin\tslint" %* 7 | ) -------------------------------------------------------------------------------- /test/external/tslint-test-config-non-relative/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/external/tslint-test-config-non-relative/index.js -------------------------------------------------------------------------------- /test/external/tslint-test-config-non-relative/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tslint-test-config-non-relative", 3 | "description": "A test package with a tslint config which is installed in the tslint.", 4 | "version": "0.0.1", 5 | "private": true, 6 | "main": "tslint.json", 7 | "scripts": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/external/tslint-test-config-non-relative/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsRules": { 3 | "class-name": true 4 | }, 5 | "rules": { 6 | "class-name": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/external/tslint-test-config/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/external/tslint-test-config/index.js -------------------------------------------------------------------------------- /test/external/tslint-test-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tslint-test-config", 3 | "version": "0.0.1", 4 | "private": true, 5 | "main": "tslint.json", 6 | "scripts": {} 7 | } 8 | -------------------------------------------------------------------------------- /test/external/tslint-test-config/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-test-custom-rules", 3 | "jsRules": { 4 | "rule-two": true, 5 | "rule-four": true 6 | }, 7 | "rules": { 8 | "rule-two": true, 9 | "rule-four": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/external/tslint-test-custom-formatter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tslint-test-custom-formatter", 3 | "version": "0.0.1", 4 | "private": true, 5 | "main": "formatter.js", 6 | "scripts": {} 7 | } 8 | -------------------------------------------------------------------------------- /test/external/tslint-test-custom-rules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tslint-test-custom-rules", 3 | "version": "0.0.1", 4 | "private": true, 5 | "main": "tslint.json", 6 | "scripts": {} 7 | } 8 | -------------------------------------------------------------------------------- /test/external/tslint-test-custom-rules/rules/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/external/tslint-test-custom-rules/rules/index.js -------------------------------------------------------------------------------- /test/external/tslint-test-custom-rules/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": ["./rules"], 3 | "jsRules": { 4 | "rule-one": true, 5 | "rule-two": false 6 | }, 7 | "rules": { 8 | "rule-one": true, 9 | "rule-two": false 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/files/.gitattributes: -------------------------------------------------------------------------------- 1 | *.ts text eol=lf 2 | -------------------------------------------------------------------------------- /test/files/allow-js-exclude-node-modules/test.ts: -------------------------------------------------------------------------------- 1 | import * as dependency from 'dependency'; 2 | console.log(dependency); 3 | -------------------------------------------------------------------------------- /test/files/allow-js-exclude-node-modules/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "maxNodeModuleJsDepth": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/files/allow-js-exclude-node-modules/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [ 4 | true, "always" 5 | ] 6 | }, 7 | "jsRules": { 8 | "semicolon": [ 9 | true, "always" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /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/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/config-exclude/subdir/tslint-extending.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint-exclude-one.json" 3 | } 4 | -------------------------------------------------------------------------------- /test/files/config-exclude/tslint-exclude-one.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [ 4 | true, 5 | "always" 6 | ] 7 | }, 8 | "linterOptions": { 9 | "exclude": [ 10 | "excluded.ts" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/files/config-findup/contains-config/tslint.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/files/config-findup/no-config/index.test.ts: -------------------------------------------------------------------------------- 1 | ''; 2 | -------------------------------------------------------------------------------- /test/files/config-findup/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/config-findup/yaml-config/tslint.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/files/config-findup/yaml-config/tslint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ... 3 | -------------------------------------------------------------------------------- /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-cli-rule-test/test.ts.lint: -------------------------------------------------------------------------------- 1 | var test = 5; 2 | -------------------------------------------------------------------------------- /test/files/custom-rule-cli-rule-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-fail": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/custom-rule-rule-test/test.ts.lint: -------------------------------------------------------------------------------- 1 | var test = 5; 2 | -------------------------------------------------------------------------------- /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/custom-rules/testUncompiledRule.ts: -------------------------------------------------------------------------------- 1 | import * as Lint from "../../../lib"; 2 | 3 | export class Rule extends Lint.Rules.AbstractRule { 4 | public apply(): Lint.RuleFailure[] { 5 | return []; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/files/fixes-test/test.ts.fix: -------------------------------------------------------------------------------- 1 | var testVariable = "eval"; 2 | 3 | function a() { 4 | function b() { 5 | function c() { 6 | console.log("hi"); 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/fixes-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/formatters/codeFrameFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module CodeFrameModule { 2 | export class CodeFrameClass { 3 | private name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/formatters/externalFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module SimpleModule { 2 | export class SimpleClass { 3 | private name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/formatters/fileslistFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module FilesListModule { 2 | export class FilesListClass { 3 | name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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/msbuildFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module ProseModule { 2 | export class ProseClass { 3 | private name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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/files/formatters/proseFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module ProseModule { 2 | export class ProseClass { 3 | private name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/formatters/stylishFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module StylishModule { 2 | export class StylishClass { 3 | private name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/formatters/tapFormatter.test.ts: -------------------------------------------------------------------------------- 1 | var x = 123; 2 | -------------------------------------------------------------------------------- /test/files/formatters/vsoFormatter.test.ts: -------------------------------------------------------------------------------- 1 | module ProseModule { 2 | export class ProseClass { 3 | private name: string; 4 | 5 | constructor(name: string) { 6 | this.name = name; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/incorrect-fixes-test/test.ts.fix: -------------------------------------------------------------------------------- 1 | var testVariable = "eval"; 2 | 3 | function a() { 4 | function b() { 5 | function c() { 6 | console.log("hi") 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/files/incorrect-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/incorrect-rule-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-eval": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/multiple-excludes/invalid.test.ts: -------------------------------------------------------------------------------- 1 | var foo = 42 -------------------------------------------------------------------------------- /test/files/multiple-excludes/invalid2.test.ts: -------------------------------------------------------------------------------- 1 | module.exports = {} -------------------------------------------------------------------------------- /test/files/multiple-excludes/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always"] 4 | } 5 | } -------------------------------------------------------------------------------- /test/files/multiple-excludes/valid.test.ts: -------------------------------------------------------------------------------- 1 | var foo = 42; -------------------------------------------------------------------------------- /test/files/multiple-fixes-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true], 4 | "semicolon": [true, "always"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/files/print-config/a.ts: -------------------------------------------------------------------------------- 1 | console.log("a"); 2 | -------------------------------------------------------------------------------- /test/files/print-config/b.ts: -------------------------------------------------------------------------------- 1 | console.log("b"); 2 | -------------------------------------------------------------------------------- /test/files/project-multiple-fixes/.gitignore: -------------------------------------------------------------------------------- 1 | /testfile.test.ts -------------------------------------------------------------------------------- /test/files/project-multiple-fixes/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": [ 3 | "before.test.ts", 4 | "after.test.ts" 5 | ] 6 | } -------------------------------------------------------------------------------- /test/files/tsconfig-allow-js/testfile.test.js: -------------------------------------------------------------------------------- 1 | module.exports = {} -------------------------------------------------------------------------------- /test/files/tsconfig-allow-js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "noEmit": false 5 | } 6 | } -------------------------------------------------------------------------------- /test/files/tsconfig-allow-js/valid.test.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /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-extends-relative/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "exclude": [ 4 | "../src" 5 | ] 6 | } -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": {}, 3 | "include": [ 4 | "src/**/*.ts", 5 | "test/**/*.ts" 6 | ] 7 | } -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/tslint-fail.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules":{ 3 | "interface-name": [ 4 | true, 5 | "never-prefix" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /test/files/tsconfig-extends-relative/tslint-ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules":{ 3 | "interface-name": [ 4 | true, 5 | "always-prefix" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /test/files/tsconfig-invalid/empty-files.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [] 3 | } 4 | -------------------------------------------------------------------------------- /test/files/tsconfig-invalid/no-match.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "*.js" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-invalid/syntax-error.json: -------------------------------------------------------------------------------- 1 | , 2 | -------------------------------------------------------------------------------- /test/files/tsconfig-no-ts-files/only.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/files/tsconfig-no-ts-files/only.d.ts -------------------------------------------------------------------------------- /test/files/tsconfig-no-ts-files/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "*" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-no-ts-files/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "tslint:latest" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /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/files/tsconfig-resolve-json-module/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "dry": false, 3 | "debug": false 4 | } -------------------------------------------------------------------------------- /test/files/tsconfig-resolve-json-module/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["index.ts"], 3 | "compilerOptions": { 4 | "resolveJsonModule": true, 5 | "allowSyntheticDefaultImports": true, 6 | "esModuleInterop": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/files/tsconfig-resolve-json-module/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "tslint:latest" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/good.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/files/tsconfig-test/good.test.ts -------------------------------------------------------------------------------- /test/files/tsconfig-test/other.test.ts: -------------------------------------------------------------------------------- 1 | console.log(1); 2 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "good.test.ts" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/files/tsconfig-test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": [true, "log"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/files/typed-rule/fail.test.ts: -------------------------------------------------------------------------------- 1 | declare const fn: any; 2 | fn(); 3 | -------------------------------------------------------------------------------- /test/files/typed-rule/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/files/typed-rule/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/_integration/enable-disable/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double"], 4 | "variable-name": true, 5 | "no-var-keyword": false, 6 | "comment-format": [ 7 | true, 8 | "check-space" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/rules/_integration/error-format/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-const": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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/_integration/typescript-version/correct.js.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.0.0 2 | 'foo'; 3 | ~~~~~ [' should be "] -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/correct.ts.fix: -------------------------------------------------------------------------------- 1 | "foo"; -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/correct.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.0.0 2 | 'foo'; 3 | ~~~~~ [' should be "] -------------------------------------------------------------------------------- /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/_integration/typescript-version/substitution.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.0.0 2 | 'foo'; // substition has the same key as the version requirement, but still works 3 | ~~~~~ [typescript] 4 | [typescript]: ' should be " -------------------------------------------------------------------------------- /test/rules/_integration/typescript-version/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double"] 4 | }, 5 | "jsRules": { 6 | "quotemark": [true, "double"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/adjacent-overload-signatures/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "adjacent-overload-signatures": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/adjacent-overload-signatures/ignore-accessors/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "adjacent-overload-signatures": [true, { "ignore-accessors": 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/align/members/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "members"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/parameters/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "parameters"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/align/statements/bom.ts.fix: -------------------------------------------------------------------------------- 1 | var foo = 1; 2 | var bar = 2; 3 | var baz = 3; 4 | -------------------------------------------------------------------------------- /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/align/statements/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [true, "statements"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/array-type/array-simple/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-type": [true, "array-simple"] 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/arrow-parens/ban-single-arg-parens/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "arrow-parens": [ 4 | true, 5 | "ban-single-arg-parens" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/arrow-parens/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "arrow-parens": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/arrow-return-shorthand/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "arrow-return-shorthand": true 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/await-promise/custom-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/await-promise/custom-promise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "linterOptions": { 3 | "typeCheck": true 4 | }, 5 | "rules": { 6 | "await-promise": [true, "CustomPromise"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/await-promise/es6-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6" 4 | } 5 | } -------------------------------------------------------------------------------- /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/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/await-promise/for-await-of/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "await-promise": 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/ban-types/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ban-types": [ 4 | true, 5 | ["String", "Use 'string' instead."], 6 | ["Object"], 7 | ["Fo*"] 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/binary-expression-operand-order/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "binary-expression-operand-order": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/callable-types/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "callable-types": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/class-name/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-format/allow-trailing-lowercase/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-format": [true, "check-space", "check-uppercase", "allow-trailing-lowercase"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-format/exceptions-pattern/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-format": [true, "check-space", "check-lowercase", {"ignore-pattern": "STD\\w{2,3}"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-format/exceptions-words/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-format": [true, "check-space", "check-lowercase", {"ignore-words": ["TODO", "HACK"]}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-format/lower/test.tsx.fix: -------------------------------------------------------------------------------- 1 | const a = ( 2 | 3 | https://github.com/ { 4 | // invalid comment 5 | content 6 | }, text 7 | 8 | ); 9 | 10 | -------------------------------------------------------------------------------- /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/comment-type/combo/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "singleline", "doc"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/directive/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "directive"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/doc/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "doc"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/multiline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "multiline"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/comment-type/single-line/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "comment-type": [true, "singleline"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/completed-docs/accessors-public/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "properties": { 5 | "privacies": ["public"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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/constructors/overloads/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "constructors": { 5 | "privacies": ["public", "private"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/constructors/overloads/true/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "constructors": { 5 | "overloads": true, 6 | "privacies": ["public", "protected", "private"] 7 | } 8 | }] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/completed-docs/constructors/privacies/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "constructors": { 5 | "privacies": ["public", "private"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/defaults/edge-case/test.ts.lint: -------------------------------------------------------------------------------- 1 | /** 2 | * Snippet where no error occurs (But completed-docs correctly gives an error on the lack of jsdoc). 3 | * @returns {Promise} 4 | */ 5 | export const handler = async () => { ... } 6 | -------------------------------------------------------------------------------- /test/rules/completed-docs/defaults/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/completed-docs/functions/overloads-separate-docs/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | function emit(event: string, data: number): void; 2 | 3 | function emit(event: string, data: string): void; 4 | 5 | /** 6 | * Exists in one place 7 | */ 8 | function emit(event: string, data:any) { } 9 | -------------------------------------------------------------------------------- /test/rules/completed-docs/functions/overloads-separate-docs/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "functions": { 5 | "privacies": ["all"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/functions/overloads-separate-docs/false/test.ts.lint: -------------------------------------------------------------------------------- 1 | function emit(event: string, data: number): void; 2 | 3 | function emit(event: string, data: string): void; 4 | 5 | /** 6 | * Exists in one place 7 | */ 8 | function emit(event: string, data:any) { } 9 | -------------------------------------------------------------------------------- /test/rules/completed-docs/functions/overloads-separate-docs/false/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "functions": { 5 | "overloads": false, 6 | "privacies": ["all"] 7 | } 8 | }] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/completed-docs/functions/overloads-separate-docs/true/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "functions": { 5 | "overloads": true, 6 | "privacies": ["all"] 7 | } 8 | }] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/completed-docs/interface-members/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [ 4 | true, 5 | "interfaces", 6 | "methods", 7 | "properties" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/completed-docs/locations/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "locations": ["instance"] 6 | }, 7 | "properties": { 8 | "locations": ["static"] 9 | } 10 | }] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/completed-docs/methods/overloads-separate-docs/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "privacies": ["all"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/methods/overloads-separate-docs/false/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "overloads": false, 6 | "privacies": ["all"] 7 | } 8 | }] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/completed-docs/methods/overloads-separate-docs/true/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "overloads": true, 6 | "privacies": ["all"] 7 | } 8 | }] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/completed-docs/privacies-private/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "privacies": ["private"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/privacies-protected/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "privacies": ["protected"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/privacies-public/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "privacies": ["public"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/privacies/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [true, { 4 | "methods": { 5 | "privacies": ["all"] 6 | } 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/completed-docs/variables/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "completed-docs": [ 4 | true, 5 | "variables" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/curly/as-needed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "curly": [true, "as-needed"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/curly/defaults/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "curly": true 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/cyclomatic-complexity/defaultThreshold/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "cyclomatic-complexity": [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/deprecation/other2.test.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated */ 2 | let x = ""; 3 | export = x; -------------------------------------------------------------------------------- /test/rules/deprecation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/deprecation/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "deprecation": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/encoding/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "encoding": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/encoding/utf16be.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/encoding/utf16be.ts.lint -------------------------------------------------------------------------------- /test/rules/encoding/utf16le.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/encoding/utf16le.ts.lint -------------------------------------------------------------------------------- /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/encoding/utf8.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/encoding/utf8.ts.lint -------------------------------------------------------------------------------- /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/eofline/disabled.ts.lint: -------------------------------------------------------------------------------- 1 | let bar = baz; 2 | let foo = bar; // tslint:disable-line: eofline -------------------------------------------------------------------------------- /test/rules/eofline/empty.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/eofline/empty.ts.lint -------------------------------------------------------------------------------- /test/rules/eofline/invalid.ts.fix: -------------------------------------------------------------------------------- 1 | let foo = bar; -------------------------------------------------------------------------------- /test/rules/eofline/invalid.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/eofline/only-whitespace.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/rules/eofline/only-whitespace.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | 3 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/eofline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "eofline": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/eofline/valid.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | -------------------------------------------------------------------------------- /test/rules/eofline/whitespace.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = bar; 2 | ~nil [file should end with a newline] -------------------------------------------------------------------------------- /test/rules/file-header/bad-newline/test.ts.fix: -------------------------------------------------------------------------------- 1 | /*! 2 | * Good header 2 3 | */ 4 | 5 | export class A { 6 | public x = 1; 7 | 8 | public B() { 9 | return 2; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-newline/test.ts.lint: -------------------------------------------------------------------------------- 1 | /*! 2 | ~nil [missing new line following the file header] 3 | * Good header 2 4 | */ 5 | export class A { 6 | public x = 1; 7 | 8 | public B() { 9 | return 2; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-newline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d", "Good header 2", "enforce-trailing-newline"] 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/file-header/bad-single-line/test.ts.fix: -------------------------------------------------------------------------------- 1 | /*! 2 | * Good header 2 3 | */ 4 | 5 | // Bad header 1 6 | 7 | export class A { 8 | public x = 1; 9 | 10 | public B() { 11 | return 2; 12 | } 13 | } 14 | 15 | /* 16 | * Good header 2 17 | */ 18 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-single-line/test.ts.lint: -------------------------------------------------------------------------------- 1 | // Bad header 1 2 | ~nil [missing file header] 3 | 4 | export class A { 5 | public x = 1; 6 | 7 | public B() { 8 | return 2; 9 | } 10 | } 11 | 12 | /* 13 | * Good header 2 14 | */ 15 | -------------------------------------------------------------------------------- /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-single-newline/test.ts.fix: -------------------------------------------------------------------------------- 1 | /*! 2 | * Good header 2 3 | */ 4 | 5 | // Bad header 6 | export class A { 7 | public x = 1; 8 | 9 | public B() { 10 | return 2; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-single-newline/test.ts.lint: -------------------------------------------------------------------------------- 1 | // Bad header 2 | ~nil [missing file header] 3 | export class A { 4 | public x = 1; 5 | 6 | public B() { 7 | return 2; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/file-header/bad-single-newline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d", "Good header 2", "enforce-trailing-newline"] 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/file-header/bad/test.ts.fix: -------------------------------------------------------------------------------- 1 | /*! 2 | * Good header 2 3 | */ 4 | 5 | /* 6 | * Bad header 1 7 | */ 8 | 9 | export class A { 10 | public x = 1; 11 | 12 | public B() { 13 | return 2; 14 | } 15 | } 16 | 17 | /* 18 | * Good header 2 19 | */ 20 | -------------------------------------------------------------------------------- /test/rules/file-header/bad/test.ts.lint: -------------------------------------------------------------------------------- 1 | /* 2 | ~nil [missing file header] 3 | * Bad header 1 4 | */ 5 | 6 | export class A { 7 | public x = 1; 8 | 9 | public B() { 10 | return 2; 11 | } 12 | } 13 | 14 | /* 15 | * Good header 2 16 | */ 17 | -------------------------------------------------------------------------------- /test/rules/file-header/bad/test2.ts.fix: -------------------------------------------------------------------------------- 1 | /*! 2 | * Good header 2 3 | */ 4 | 5 | // ********************************** 6 | // Bad header 7 | // ********************************** 8 | -------------------------------------------------------------------------------- /test/rules/file-header/bad/test2.ts.lint: -------------------------------------------------------------------------------- 1 | // ********************************** 2 | ~nil [missing file header] 3 | // Bad header 4 | // ********************************** 5 | -------------------------------------------------------------------------------- /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-header/empty-file/test.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [missing file header] 3 | -------------------------------------------------------------------------------- /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-allow-single-line-comments/test.ts.lint: -------------------------------------------------------------------------------- 1 | // ********************************** 2 | // Good header 3 | // ********************************** 4 | 5 | -------------------------------------------------------------------------------- /test/rules/file-header/good-allow-single-line-comments/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, { 4 | "match": "Good header", 5 | "allow-single-line-comments": true 6 | }] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/file-header/good-newline/test.ts.lint: -------------------------------------------------------------------------------- 1 | /* Copyright 2019 */ 2 | 3 | class Foo {} 4 | -------------------------------------------------------------------------------- /test/rules/file-header/good-newline/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [ 4 | true, 5 | "Copyright \\d{4}", 6 | "Copyright 2019", 7 | "enforce-trailing-newline" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/file-header/good-shebang/test.ts.lint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 4 | /* 5 | * Good header 2 6 | */ 7 | 8 | export class A { 9 | public x = 1; 10 | 11 | public B() { 12 | return 2; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/rules/file-header/good-shebang/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-header/good-single-line/test.ts.lint: -------------------------------------------------------------------------------- 1 | // Good header 4 2 | 3 | export class A { 4 | public x = 1; 5 | 6 | public B() { 7 | return 2; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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/test.ts.lint: -------------------------------------------------------------------------------- 1 | /* 2 | * Good header 3 3 | */ 4 | 5 | "use strict"; 6 | 7 | export class A { 8 | public x = 1; 9 | 10 | public B() { 11 | return 2; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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-header/good/test.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Good header 1 4 | */ 5 | 6 | export class A { 7 | public x = 1; 8 | 9 | public B() { 10 | return 2; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/file-header/good/test.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Good header 1 4 | */ 5 | 6 | export class A { 7 | public x = 1; 8 | 9 | public B() { 10 | return 2; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/file-header/good/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-header": [true, "Good header \\d"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/camel-case/camelCase.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/camel-case/camelCase.ts.lint -------------------------------------------------------------------------------- /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/camel-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "camel-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/ComponentName.tsx.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/complex/ComponentName.tsx.lint -------------------------------------------------------------------------------- /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/complex/my-button.component.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/nonComponentName.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/complex/nonComponentName.ts.lint -------------------------------------------------------------------------------- /test/rules/file-name-casing/complex/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, { 4 | ".component.ts$": "pascal-case", 5 | ".tsx$": "pascal-case", 6 | ".ts$": "camel-case" 7 | }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/PascalCase.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/file-matcher/PascalCase.ts.lint -------------------------------------------------------------------------------- /test/rules/file-name-casing/file-matcher/camelCase.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/file-matcher/camelCase.ts.lint -------------------------------------------------------------------------------- /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/file-matcher/not_kebab_case.tsx.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be kebab-case] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/ignore/complaint.tsx.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be PascalCase] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/ignore/file.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/ignore/file.ts.lint -------------------------------------------------------------------------------- /test/rules/file-name-casing/ignore/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, { 4 | ".ts$": "ignore", 5 | ".tsx$": "pascal-case" 6 | }] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/invalid-option/snake_case.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/invalid-option/snake_case.ts.lint -------------------------------------------------------------------------------- /test/rules/file-name-casing/invalid-option/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "invalid-option"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/kebab-case/kebab-case.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/kebab-case/kebab-case.ts.lint -------------------------------------------------------------------------------- /test/rules/file-name-casing/kebab-case/noKebabCase.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be kebab-case] 3 | -------------------------------------------------------------------------------- /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/PascalCase.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/pascal-case/PascalCase.ts.lint -------------------------------------------------------------------------------- /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/pascal-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "pascal-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/snake-case/no-snake-case.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [File name must be snake_case] 3 | -------------------------------------------------------------------------------- /test/rules/file-name-casing/snake-case/snake_case.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/file-name-casing/snake-case/snake_case.ts.lint -------------------------------------------------------------------------------- /test/rules/file-name-casing/snake-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "file-name-casing": [true, "snake-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/forin/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "forin": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/function-constructor/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "function-constructor": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/import-blacklist/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import-blacklist": [true, "rxjs", { "lodash": ["pullAll", "pull"] }, { "dummy": ["default"] }, [".*\\.temp$", ".*\\.tmp$"]] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/import-spacing/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import-spacing": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/increment-decrement/allow-post/test.ts.fix: -------------------------------------------------------------------------------- 1 | let x = 7; 2 | 3 | x += 1; 4 | x++; 5 | 6 | x -= 1; 7 | x--; 8 | 9 | +x; 10 | -x; 11 | x + 1; 12 | x - 1; 13 | 1 + x; 14 | 1 - x; 15 | 16 | x + (x += 1); 17 | x + x++; 18 | 19 | x - (x -= 1); 20 | x - x--; 21 | -------------------------------------------------------------------------------- /test/rules/increment-decrement/allow-post/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "increment-decrement": [true, "allow-post"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/increment-decrement/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "increment-decrement": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/indent/spaces-2/test.tsx.lint: -------------------------------------------------------------------------------- 1 | 2 | 3 | ~ [0] 4 | baz 5 | ~~ [0] 6 | 7 | ~ [0] 8 | 9 | { 10 | ~ [0] 11 | 12 | ~~ [0] 13 | } 14 | ~ [0] 15 | 16 | 17 | [0]: 2 space indentation expected -------------------------------------------------------------------------------- /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/always-prefix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-name": [true, "always-prefix"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/interface-name/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | interface IValidInterfaceName { 2 | 3 | } 4 | 5 | interface NotValidInterfaceName { 6 | ~~~~~~~~~~~~~~~~~~~~~ [interface name must start with a capitalized I] 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/interface-name/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-name": true 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/test.ts.fix: -------------------------------------------------------------------------------- 1 | interface T { x: number; } 2 | 3 | type U = string; 4 | type V = { x: number; } | { y: string; }; 5 | export interface W { 6 | x: T, 7 | } 8 | type Record = { 9 | [K in T]: U; 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/interface-over-type-literal/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "interface-over-type-literal": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/invalid-void/allow-generics/false/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "invalid-void": [true, { 4 | "allow-generics": false 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/invalid-void/allow-generics/true/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "invalid-void": [true, { 4 | "allow-generics": true 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/invalid-void/allow-generics/whitelist/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "invalid-void": [true, { 4 | "allow-generics": ["Allowed"] 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/invalid-void/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "invalid-void": true 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/jsdoc-format/default/jsdoc-bom.ts.lint: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a valid jsdoc comment and should show no warning even though there is a BOM in the first line 3 | */ 4 | -------------------------------------------------------------------------------- /test/rules/jsdoc-format/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "jsdoc-format": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/label-position/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "label-position": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/linebreak-style/emptyFile/test.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/linebreak-style/emptyFile/test.ts.lint -------------------------------------------------------------------------------- /test/rules/linebreak-style/emptyFile/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "LF"] 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/linebreak-style/failure/CRLF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "LF"] 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/failure/LF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "CRLF"] 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/linebreak-style/success/CRLF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "CRLF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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/linebreak-style/success/LF/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "linebreak-style": [true, "LF"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/anonymous.test.ts: -------------------------------------------------------------------------------- 1 | export default 0; 2 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/named.test.ts: -------------------------------------------------------------------------------- 1 | export default function a() {} 2 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/test.ts.lint: -------------------------------------------------------------------------------- 1 | import b from "./named.test"; 2 | ~ [Expected import 'b' to match the default export 'a'.] 3 | import anyName from "./anonymous.test"; 4 | -------------------------------------------------------------------------------- /test/rules/match-default-export-name/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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/one/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-classes-per-file": [true, 1, "exclude-class-expressions"] 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/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/max-line-length/check-strings-and-regex/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-line-length": [true, { 4 | "limit": "140", 5 | "ignore-pattern": "^import ", 6 | "check-strings": true, 7 | "check-regex": true 8 | }] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /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/accessor/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "check-accessor"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-access/constructor/test.ts.fix: -------------------------------------------------------------------------------- 1 | class ContructorsNoAccess { 2 | public constructor(i: number); 3 | public constructor(o: any) {} 4 | } 5 | 6 | class ContructorsAccess { 7 | public constructor(i: number); 8 | public constructor(o: any) {} 9 | } 10 | 11 | -------------------------------------------------------------------------------- /test/rules/member-access/constructor/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "check-constructor"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-access/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": true 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/member-access/parameter-property/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-access": [true, "check-parameter-property"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-ordering/alphabetize-nested/test.ts.fix: -------------------------------------------------------------------------------- 1 | class X { 2 | a() { 3 | class A { 4 | e() {} 5 | f() {} 6 | } 7 | } 8 | b() { 9 | class B { 10 | c() {} 11 | d() {} 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/rules/member-ordering/alphabetize-nested/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { 4 | "order": "fields-first", 5 | "alphabetize": true 6 | }] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/member-ordering/alphabetize/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { 4 | "order": "fields-first", 5 | "alphabetize": true 6 | }] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/member-ordering/custom-categories/test.ts.fix: -------------------------------------------------------------------------------- 1 | class C { 2 | static foo() {} 3 | protected static bar = 0; 4 | static baz(); 5 | 6 | static bang(); 7 | 8 | constructor(); 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/member-ordering/custom/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { "order": [ 4 | "public-static-method", 5 | "private-instance-field" 6 | ]}] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /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/fix-trivia/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { 4 | "order": "fields-first", 5 | "alphabetize": true 6 | }] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/member-ordering/instance-sandwich/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { "order": "instance-sandwich" }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/member-ordering/mix-old-options/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, 4 | "public-before-private", 5 | "static-before-instance", 6 | "variables-before-functions" 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/member-ordering/omit-access-modifier/test.ts.fix: -------------------------------------------------------------------------------- 1 | class C { 2 | private static x = 0; 3 | static y = 1; 4 | 5 | static z = 2; 6 | 7 | x = 0; 8 | private y = 1; 9 | 10 | constructor() {} 11 | } 12 | -------------------------------------------------------------------------------- /test/rules/member-ordering/omit-access-modifier/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, { "order": [ 4 | "static-field", 5 | "instance-field", 6 | "constructor" 7 | ]}] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/member-ordering/public-before-private/test.ts.fix: -------------------------------------------------------------------------------- 1 | class Foo { 2 | y: number; 3 | private x: number; 4 | private bar(): any { 5 | var bla: { a: string } = {a: '1'}; 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /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/test.ts.fix: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static y: number; 3 | x: number; 4 | constructor() { 5 | // nothing to do 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /test/rules/member-ordering/static-before-instance/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, "static-before-instance"] 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/member-ordering/variables-before-functions/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "member-ordering": [true, "variables-before-functions"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/new-parens/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "new-parens": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/newline-before-return/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "newline-before-return": true 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-any/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-any": 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-arg/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-arg": 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-bitwise/test.ts.lint: -------------------------------------------------------------------------------- 1 | var z = (x || 3) && (y || 4); 2 | var yy = x | 3; 3 | ~~~~~ [Forbidden bitwise operation] 4 | var zz = (z || y) & (x | y); 5 | ~~~~~~~~~~~~~~~~~~ [Forbidden bitwise operation] 6 | ~~~~~ [Forbidden bitwise operation] 7 | -------------------------------------------------------------------------------- /test/rules/no-bitwise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-bitwise": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-boolean-literal-compare/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-boolean-literal-compare/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-boolean-literal-compare": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-conditional-assignment/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-conditional-assignment": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-consecutive-blank-lines/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-consecutive-blank-lines": true 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-consecutive-blank-lines/multiple/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-consecutive-blank-lines": [true, 2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-console/all/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": 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-construct/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-construct": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-debugger/test.ts.lint: -------------------------------------------------------------------------------- 1 | var testVariable = "debugger"; 2 | 3 | function testFunction(): number { 4 | if (testVariable === "debugger") { 5 | debugger; 6 | ~~~~~~~~~ [Use of debugger statements is forbidden] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-debugger/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-debugger": 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-default-import/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-default-import": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-default-import/fromModules/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-default-import": [ 4 | true, 5 | { 6 | "fromModules": "^tslint-|^\\./|^\\.\\./" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-imports/allow-namespace-imports/test.d.ts.lint: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | declare module "foo" { 3 | import {readFile} from 'fs'; 4 | } 5 | 6 | declare module "*"; 7 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-imports/allow-namespace-imports/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-imports": { 4 | "severity": "error", 5 | "options": { 6 | "allow-namespace-imports": true 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-imports/default/test.d.ts.lint: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | declare module "foo" { 3 | import {readFile} from 'fs'; 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Multiple imports from 'fs' can be combined into one.] 5 | } 6 | 7 | declare module "*"; 8 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-imports/default/test2.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare module 'a' { 2 | import foo from 'foo'; 3 | } 4 | 5 | declare module 'b' { 6 | // No error -- this is a separate ambient module declaration. 7 | import foo from 'foo'; 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-duplicate-imports/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-imports": 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-duplicate-switch-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-switch-case": [true] 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-duplicate-variable/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": 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-empty/allow-empty-catch/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-empty": [true, "allow-empty-catch"] 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-empty/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-empty": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-eval/test.ts.lint: -------------------------------------------------------------------------------- 1 | var testVariable = "eval"; 2 | 3 | function a() { 4 | function b() { 5 | function c() { 6 | eval("console.log('hi');"); 7 | ~~~~ [forbidden eval] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/no-eval/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-eval": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-floating-promises/jquerypromise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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-floating-promises/promises/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-floating-promises/promises/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-floating-promises": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-for-in-array/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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-for-in/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-for-in": true 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-implicit-dependencies/default/bom/test.ts.lint: -------------------------------------------------------------------------------- 1 | import * as ts from "typescript"; 2 | ~~~~~~~~~~~~ [Module 'typescript' is not listed as dependency in package.json] 3 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/builtin-only.ts.lint: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import path = require('path'); 3 | import('child_process').then(cp => cp.exec('foo')); 4 | const http = require('http'); 5 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/malformed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | , 3 | } 4 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/malformed/tets.ts.lint: -------------------------------------------------------------------------------- 1 | import foo from 'foo'; 2 | ~~~~~ [Module 'foo' is not listed as dependency in package.json] 3 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/nested-package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nested", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "baz": "next" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-implicit-dependencies": true 4 | }, 5 | "jsRules": { 6 | "no-implicit-dependencies": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/dev/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-implicit-dependencies": [true, "dev"] 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-implicit-dependencies/whitelist-with-dev/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-implicit-dependencies": [true, "dev", ["src", "app"]] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-implicit-dependencies/whitelist/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-implicit-dependencies": [true, ["src", "app", "@components", "@com/fixer"]] 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-import-side-effect/ignore-module/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-import-side-effect": [ 4 | true, 5 | { 6 | "ignore-module": "(allow-side-effect|\\.css)$" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/no-inferrable-types/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-inferrable-types": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-inferrable-types/ignore-params/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-inferrable-types": [ 4 | true, 5 | "ignore-params" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /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-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-internal-module/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-internal-module": 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-invalid-this/enabled/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-invalid-this": [ 4 | true, 5 | "check-function-in-method" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-irregular-whitespace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-irregular-whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-magic-numbers/allowed-numbers/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": [true, { 4 | "allowed-numbers": [1337, 1337.7, -1337, -0] 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /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-magic-numbers/default-jsx/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-magic-numbers/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-magic-numbers": true 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-mergeable-namespace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-mergeable-namespace": 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-namespace/allow-declarations/test.d.ts.lint: -------------------------------------------------------------------------------- 1 | namespace N { } 2 | -------------------------------------------------------------------------------- /test/rules/no-namespace/allow-declarations/test.ts.lint: -------------------------------------------------------------------------------- 1 | declare global {} 2 | 3 | declare namespace Foo { 4 | // Allowed because namespaces nested in ambients are implicitly ambient. 5 | namespace Foo { 6 | 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-namespace/allow-declarations/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-namespace": [true, "allow-declarations"] 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-namespace/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-namespace": [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-non-null-assertion/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-non-null-assertion": 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-null-undefined-union/ts350.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 3.5.0 2 | 3 | type SomeType = 4 | 5 | | null 6 | ~~~~~~ 7 | | undefined 8 | ~~~~~~~~~~~~~~~ 9 | | boolean; 10 | ~~~~~~~~~~~~~ [0] 11 | 12 | [0]: Union type cannot include both 'null' and 'undefined'. 13 | -------------------------------------------------------------------------------- /test/rules/no-null-undefined-union/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-null-undefined-union": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-object-literal-type-assertion/allow-arguments/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-object-literal-type-assertion": [true, { "allow-arguments": true }] 4 | } 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-parameter-properties/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-parameter-properties": 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-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/custom-promise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-promise-as-boolean": [true, { "promise-classes": ["CustomPromise"] }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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-promise-as-boolean/es6-promise/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-promise-as-boolean": 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-reference-import/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-reference-import": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-reference/test.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: <2.4.0 2 | /// 3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ is not allowed, use imports] 4 | -------------------------------------------------------------------------------- /test/rules/no-reference/ts240.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >=2.4.0 2 | /// 3 | ~~~~~~~~~~~~ [ is not allowed, use imports] 4 | -------------------------------------------------------------------------------- /test/rules/no-reference/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-reference": 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-restricted-globals/foo.d.ts: -------------------------------------------------------------------------------- 1 | export var name: string; -------------------------------------------------------------------------------- /test/rules/no-restricted-globals/namespace.ts.lint: -------------------------------------------------------------------------------- 1 | console.log(name); 2 | ~~~~ [Unexpected global variable 'name'. Use a local parameter or variable instead.] 3 | 4 | namespace A { 5 | const foo = name; 6 | } 7 | 8 | namespace A { 9 | export var name = 23; 10 | } -------------------------------------------------------------------------------- /test/rules/no-restricted-globals/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "lib": [ 5 | "dom" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-restricted-globals/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-restricted-globals": [ 4 | true, 5 | "name", 6 | "length", 7 | "event", 8 | "badGlobal" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/rules/no-return-await/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-return-await": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-shadowed-variable/default/ambient.d.ts.lint: -------------------------------------------------------------------------------- 1 | // no errors in declaration files 2 | declare type T = any; 3 | declare class C {} 4 | declare namespace ns { 5 | type T = C; 6 | class C {} 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-shadowed-variable/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadowed-variable": 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-shadowed-variable/ignore-underscore/test.ts.lint: -------------------------------------------------------------------------------- 1 | import _ = require('lodash'); 2 | 3 | function foo(_) { 4 | console.log(_); 5 | } 6 | 7 | function foo(_1, _2) { 8 | // Allow shadowing of multiple unused parameters 9 | [].map((_1, _2) => undefined); 10 | } 11 | -------------------------------------------------------------------------------- /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-shadowed-variable/temporal-dead-zone/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadowed-variable": [ 4 | true, 5 | { 6 | "temporalDeadZone": false 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /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-string-throw/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-string-throw": true 4 | } 5 | } -------------------------------------------------------------------------------- /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-submodule-imports/static-imports/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-submodule-imports": [true, "@angular/core", "rxjs", "@angular/platform-browser/animations"] 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-tautology-expression/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-tautology-expression": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-this-assignment/allow-destructuring/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-this-assignment": [true, { 4 | "allow-destructuring": true 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-this-assignment/allowed-names/test.ts.lint: -------------------------------------------------------------------------------- 1 | const start = this; 2 | 3 | const startEnd = this; 4 | 5 | const endStart = this; 6 | ~~~~~~~~~~~~~~~ [name % ('endStart')] 7 | 8 | [name]: Assigning `this` reference to local variable not allowed: %s. 9 | -------------------------------------------------------------------------------- /test/rules/no-this-assignment/allowed-names/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-this-assignment": [true, { 4 | "allowed-names": ["^start"] 5 | }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-this-assignment/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-this-assignment": 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-trailing-whitespace/ignore-comments/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": [true, "ignore-comments"] 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-trailing-whitespace/ignore-template-strings/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-trailing-whitespace": [ 4 | true, 5 | "ignore-template-strings" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /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-trailing-whitespace/zero-width-no-break-space/test.ts.lint: -------------------------------------------------------------------------------- 1 |  2 | // This file starts with a zero width no-break-space. 3 | // See http://www.fileformat.info/info/unicode/char/feff/index.htm 4 | const a = 3; 5 | -------------------------------------------------------------------------------- /test/rules/no-trailing-whitespace/zero-width-no-break-space/test2.ts.lint: -------------------------------------------------------------------------------- 1 |  2 | ~~ [trailing whitespace] 3 | // This file starts with a zero width no-break-space followed by a trailing space. 4 | // See http://www.fileformat.info/info/unicode/char/feff/index.htm 5 | const a = 3; 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-unbound-method/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unbound-method/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unbound-method": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unbound-method/ignore-static/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unbound-method/ignore-static/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "linterOptions": { 3 | "typeCheck": true 4 | }, 5 | "rules": { 6 | "no-unbound-method": [true, "ignore-static"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-unbound-method/whitelist/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unbound-method/whitelist/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "linterOptions": { 3 | "typeCheck": true 4 | }, 5 | "rules": { 6 | "no-unbound-method": [true, { "whitelist": ["expect"], "allow-typeof": true, "allow-delete": true }] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-callback-wrapper/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-callback-wrapper": true 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-class/allow-empty/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-class": [true, "allow-empty-class"] 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-class/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-class": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-initializer/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-initializer": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-qualifier/b.test.ts: -------------------------------------------------------------------------------- 1 | export type T = number; -------------------------------------------------------------------------------- /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-unnecessary-qualifier/test-global.ts.fix: -------------------------------------------------------------------------------- 1 | namespace N { 2 | export type T = number; 3 | export const x: T = 0; 4 | export const x: M.T = 0; 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-qualifier/test-global.ts.lint: -------------------------------------------------------------------------------- 1 | namespace N { 2 | export type T = number; 3 | export const x: N.T = 0; 4 | ~ [Qualifier is unnecessary since 'N' is in scope.] 5 | export const x: M.T = 0; 6 | } 7 | -------------------------------------------------------------------------------- /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-unnecessary-type-assertion/noStrictNullChecks/test.ts.lint: -------------------------------------------------------------------------------- 1 | declare const x: string | undefined; 2 | x!; 3 | 4 | declare const y: string; 5 | y as string; 6 | ~~~~~~~~~~~ [This assertion is unnecessary since it does not change the type of the expression.] 7 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/noStrictNullChecks/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/noStrictNullChecks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-type-assertion": true 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-unnecessary-type-assertion/strict/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-type-assertion": [true, "AnyDuringMigration"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/strictNullChecks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2015", 4 | "strictNullChecks": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/no-unnecessary-type-assertion/strictNullChecks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unnecessary-type-assertion": [true, "AnyDuringMigration"] 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/default/es6Module.ts: -------------------------------------------------------------------------------- 1 | const defaultExport: any = 0; 2 | export default defaultExport; 3 | export const namedExport: any = 0; 4 | export type T = number; 5 | 6 | export namespace NS { 7 | export interface ITest {} 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "experimentalDecorators": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/jsx/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react", 4 | "module": "commonjs", 5 | "target": "es6", 6 | "experimentalDecorators": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/jsx/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/unknown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "experimentalDecorators": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-any/unknown/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-any": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unsafe-finally/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unsafe-finally": true 4 | } 5 | } -------------------------------------------------------------------------------- /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-expression/allow-new/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-expression": [ 4 | true, 5 | "allow-new", 6 | "allow-fast-null-checks" 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/rules/no-unused-expression/allow-tagged-template/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-expression": [ 4 | true, 5 | "allow-tagged-template" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/no-unused-expression/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-expression": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/check-parameters/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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/no-unused-variable/default/node_modules/a.ts: -------------------------------------------------------------------------------- 1 | declare var x: any; 2 | export = x; 3 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/node_modules/react.ts: -------------------------------------------------------------------------------- 1 | export default x = 0; -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/node_modules/react/addons.ts: -------------------------------------------------------------------------------- 1 | export const x = 0; -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/react-addons1.tsx.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >= 2.1.0 < 2.9.0 2 | 3 | import * as React from "react/addons"; 4 | 5 | console.log(
); 6 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/react-addons2.tsx.lint: -------------------------------------------------------------------------------- 1 | [typescript]: < 2.9.0 2 | import * as React from "react/addons"; 3 | 4 | export class MyComponent extends React.Component<{}, {}> {} 5 | -------------------------------------------------------------------------------- /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/no-unused-variable/default/react2.tsx.lint: -------------------------------------------------------------------------------- 1 | [typescript]: < 2.9.0 2 | import * as React from "react"; 3 | 4 | export class MyComponent extends React.Component<{}, {}> {} 5 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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-unused-variable/ignore-pattern/a.test.ts: -------------------------------------------------------------------------------- 1 | export class _A {} 2 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/ignore-pattern/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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-unused-variable/type-checked/a.test.ts: -------------------------------------------------------------------------------- 1 | export class A {} 2 | export var a: A; 3 | -------------------------------------------------------------------------------- /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/no-unused-variable/type-checked/test.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: < 2.9.0 2 | import {a, A} from './a.test'; 3 | 4 | export class B { 5 | static thing = a; 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/no-unused-variable/type-checked/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/no-unused-variable/type-checked/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-variable": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/$.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/$.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportAliasSecond.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/ImportAliasSecond.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportAliasWithComment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/ImportAliasWithComment.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportRegularAlias.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/ImportRegularAlias.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/ImportWithLineBreaks.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/ImportWithLineBreaks.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/InterfaceFile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/InterfaceFile.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/lib.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/lib.ts -------------------------------------------------------------------------------- /test/rules/no-use-before-declare/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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-use-before-declare/underscore.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/palantir/tslint/285fc1db18d1fd24680d6a2282c6445abf1566ee/test/rules/no-use-before-declare/underscore.ts -------------------------------------------------------------------------------- /test/rules/no-var-keyword/global.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare var x: number; 2 | 3 | declare namespace N { 4 | var y: number; 5 | ~~~ [0] 6 | } 7 | 8 | [0]: Forbidden 'var' keyword, use 'let' or 'const' instead 9 | -------------------------------------------------------------------------------- /test/rules/no-var-keyword/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-var-keyword": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/no-var-requires/test.ts.lint: -------------------------------------------------------------------------------- 1 | import a = require("a"); 2 | var b = require("b"); 3 | ~~~~~~~~~~~~ [require statement not part of an import statement] 4 | -------------------------------------------------------------------------------- /test/rules/no-var-requires/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-var-requires": 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/no-void-expression/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-void-expression": true 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/no-void-expression/ignore-arrow-function-shorthand/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-void-expression": [true, "ignore-arrow-function-shorthand"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/number-literal-format/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "number-literal-format": true 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-key-quotes/as-needed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-key-quotes": [true, "as-needed"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-key-quotes/consistent-as-needed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-key-quotes": [true, "consistent-as-needed"] 4 | } 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-shorthand/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-shorthand": [true, "always"] 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/object-literal-shorthand/onlyMethods/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-shorthand": [ 4 | true, 5 | { 6 | "property": "never", 7 | "method": "always" 8 | } 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/default/crlf.ts.lint: -------------------------------------------------------------------------------- 1 | // ensure that we don't treat \r\n as two line breaks 2 | let obj = { 3 | foo: 1, 4 | bar: 2, 5 | ~~~ [The key 'bar' is not sorted alphabetically] 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": true 4 | } 5 | } 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/ignore-case/test.ts.lint: -------------------------------------------------------------------------------- 1 | const a = { 2 | array: [], 3 | objList: [{}, {}], 4 | object: {}, 5 | ~~~~~~ [The key 'object' is not sorted alphabetically] 6 | } 7 | 8 | const b = { 9 | array: [], 10 | object: {}, 11 | objList: [{}, {}], 12 | } 13 | -------------------------------------------------------------------------------- /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/object-literal-sort-keys/locale-compare/test.ts.lint: -------------------------------------------------------------------------------- 1 | const a = { 2 | autor: 1, 3 | título: 2, 4 | type: 3 5 | } 6 | 7 | const b = { 8 | autor: 1, 9 | type: 3, 10 | título: 2 11 | ~~~~~~ [The key 'título' is not sorted alphabetically] 12 | } 13 | -------------------------------------------------------------------------------- /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/object-literal-sort-keys/match-declaration-order-only/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/match-declaration-order-only/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": [true, "ignore-case", "match-declaration-order-only"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/match-declaration-order/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/rules/object-literal-sort-keys/match-declaration-order/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "object-literal-sort-keys": [true, "ignore-case", "match-declaration-order"] 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/one-line/all/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-finally", "check-whitespace"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/one-line/no-whitespace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-finally"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/one-line/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-line": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/one-variable-per-declaration/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-variable-per-declaration": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/one-variable-per-declaration/ignore-for-loop/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "one-variable-per-declaration": [true, 4 | "ignore-for-loop" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/only-arrow-functions/allow-declarations/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "only-arrow-functions": [true, "allow-declarations"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/only-arrow-functions/allow-named-functions/test.ts.lint: -------------------------------------------------------------------------------- 1 | const x = function() {} 2 | ~~~~~~~~ [0] 3 | const y = function y() {} 4 | 5 | function z() {} 6 | 7 | [0]: non-arrow functions are forbidden 8 | -------------------------------------------------------------------------------- /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/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/ordered-imports/import-sources-any/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true, {"import-sources-order": "any"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/import-sources-any/grouped-imports/test.ts.fix: -------------------------------------------------------------------------------- 1 | import { getOr } from 'lodash/fp' 2 | import { Request } from 'express' 3 | 4 | import { getStatusCode } from './errors' 5 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/import-sources-any/grouped-imports/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true, {"import-sources-order": "any", "grouped-imports": true}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/inside-module-declaration/test.ts.lint: -------------------------------------------------------------------------------- 1 | declare module "foo" { 2 | import y from "y"; 3 | import x from "x"; 4 | ~~~~~~~~~~~~~~~~~~ [0] 5 | } 6 | 7 | [0]: Import sources within a group must be alphabetized. 8 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/inside-module-declaration/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/lowercase-first/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true, {"import-sources-order": "lowercase-first", "named-imports-order": "lowercase-first"}] 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/ordered-imports/named-imports-any/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "ordered-imports": [true, {"named-imports-order": "any"}] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/ordered-imports/standalone-grouped-import/test.ts.fix: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import {a} from 'foo'; 4 | import x = require('y'); 5 | 6 | import './baa'; 7 | import './baz'; 8 | import './caa'; 9 | 10 | export class Test {} 11 | -------------------------------------------------------------------------------- /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-conditional-expression/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-conditional-expression": true 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-const/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-const": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-const/destructuring-all/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-const": [ 4 | true, 5 | {"destructuring": "all"} 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/prefer-for-of/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-for-of": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-function-over-method/allow-protected/test.ts.lint: -------------------------------------------------------------------------------- 1 | class C { 2 | a() {} 3 | ~ [0] 4 | protected b() {} 5 | private c() {} 6 | ~ [0] 7 | } 8 | 9 | [0]: Class method does not use 'this'. Use a function instead. 10 | -------------------------------------------------------------------------------- /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/prefer-function-over-method/allow-public-and-protected/test.ts.lint: -------------------------------------------------------------------------------- 1 | class C { 2 | a() {} 3 | protected b() {} 4 | private c() {} 5 | ~ [0] 6 | } 7 | 8 | [0]: Class method does not use 'this'. Use a function instead. 9 | -------------------------------------------------------------------------------- /test/rules/prefer-function-over-method/allow-public-and-protected/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-function-over-method": [true, "allow-public", "allow-protected"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-function-over-method/allow-public/test.ts.lint: -------------------------------------------------------------------------------- 1 | class C { 2 | a() {} 3 | protected b() {} 4 | ~ [0] 5 | private c() {} 6 | ~ [0] 7 | } 8 | 9 | [0]: Class method does not use 'this'. Use a function instead. 10 | -------------------------------------------------------------------------------- /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/prefer-function-over-method/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-function-over-method": 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/prefer-readonly/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-readonly/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-readonly": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/prefer-readonly/only-inline-lambdas/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 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/prefer-switch/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-switch": true 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/prefer-template/allow-single-concat/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-template": [true, "allow-single-concat"] 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/prefer-template/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-template": [true] 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/prefer-while/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "prefer-while": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/promise-function-async/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/promise-function-async/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "promise-function-async": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/backtick/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "backtick"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/double-avoid-escape/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = "single"; 2 | var double = "married"; 3 | var singleWithinDouble = "'singleWithinDouble'"; 4 | var doubleWithinSingle = '"doubleWithinSingle"'; 5 | var tabNewlineWithinSingle = "tab\tNewline\nWithinSingle"; 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/double-avoid-escape/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double", "avoid-escape"] 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/double/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-double/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = "single"; 2 | var unbalancedSingleAfter = ('a) 3 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-double/test.ts.lint: -------------------------------------------------------------------------------- 1 | var single = 'single'; 2 | ~~~~~~~~ [' should be "] 3 | var unbalancedSingleAfter = ('a) 4 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-double/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-single/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = 'single'; 2 | var unbalancedSingleAfter = ("a) 3 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-single/test.ts.lint: -------------------------------------------------------------------------------- 1 | var single = "single"; 2 | ~~~~~~~~ [" should be '] 3 | var unbalancedSingleAfter = ("a) 4 | -------------------------------------------------------------------------------- /test/rules/quotemark/invalid-single/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/jsx-double/test.tsx.fix: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export const a = ( 4 |
5 | -------------------------------------------------------------------------------- /test/rules/quotemark/jsx-double/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true,"jsx-double", "single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/jsx-single/test.tsx.fix: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | export const a = ( 4 |
5 | -------------------------------------------------------------------------------- /test/rules/quotemark/jsx-single/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "double", "jsx-single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/single-avoid-escape/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = 'single'; 2 | var double = 'married'; 3 | var singleWithinDouble = "'singleWithinDouble'"; 4 | var doubleWithinSingle = '"doubleWithinSingle"'; 5 | var tabNewlineWithinDouble = 'tab\tNewline\nWithinDouble'; 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-avoid-template/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single", "avoid-escape", "avoid-template"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/quotemark/single/test.ts.fix: -------------------------------------------------------------------------------- 1 | var single = 'single'; 2 | var double = 'married'; 3 | var singleWithinDouble = '\'singleWithinDouble\''; 4 | var doubleWithinSingle = '"doubleWithinSingle"'; 5 | var tabNewlineWithinDouble = 'tab\tNewline\nWithinDouble'; 6 | 'escaped"quotemark'; 7 | -------------------------------------------------------------------------------- /test/rules/quotemark/single/test.tsx.lint: -------------------------------------------------------------------------------- 1 | let foo = 2 | ~~~~~ [" should be '] 3 | -------------------------------------------------------------------------------- /test/rules/quotemark/single/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotemark": [true, "single"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/radix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "radix": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/restrict-plus-operands/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/restrict-plus-operands/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "restrict-plus-operands": true 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/return-undefined/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/return-undefined/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "return-undefined": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/return-undefined/pre-ts-3.6/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/return-undefined/pre-ts-3.6/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/semicolon/enabled/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": true 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/ignore-interfaces/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "always", "ignore-interfaces"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/semicolon/never/eof1.ts.lint: -------------------------------------------------------------------------------- 1 | var foo = bar; 2 | ~ [Unnecessary semicolon] -------------------------------------------------------------------------------- /test/rules/semicolon/never/eof2.ts.lint: -------------------------------------------------------------------------------- 1 | return; 2 | ~ [Unnecessary semicolon] -------------------------------------------------------------------------------- /test/rules/semicolon/never/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "never"] 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/space-before-function-paren/always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-before-function-paren": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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/space-within-parens/no-space/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "space-within-parens": [true, 0] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/static-this/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "static-this": true 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-boolean-undefined-union/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-boolean-or-undefined"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-enum/test.ts.lint: -------------------------------------------------------------------------------- 1 | declare function get(): T; 2 | 3 | if (get()) {} 4 | 5 | enum E {} 6 | if (get()) {} 7 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-enum/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /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-mix/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-mix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-string", "allow-undefined-union", "allow-mix"] 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/allow-null-union/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-null-union"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-number/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /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/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /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-boolean-expressions/allow-undefined-union/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/allow-undefined-union/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-undefined-union"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/ignore-rhs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/ignore-rhs/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "ignore-rhs"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-allow-mix/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-allow-mix/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-string", "allow-undefined-union"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-null-checks-allow-null-union/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "strictNullChecks": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-null-checks-allow-null-union/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-null-union"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-null-checks-allow-number-string/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": false 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-boolean-expressions/no-null-checks-allow-number-string/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": [true, "allow-number", "allow-string"] 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-boolean-expressions/no-null-checks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-boolean-expressions": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/allow-object-equal-comparison/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/allow-object-equal-comparison/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-comparisons": [ 4 | true, 5 | { 6 | "allow-object-equal-comparison": true 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/allow-string-order-comparison/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/allow-string-order-comparison/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-comparisons": [ 4 | true, 5 | { 6 | "allow-string-order-comparison": true 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/default/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-comparisons/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-comparisons": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-string-expressions/allow-empty-types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/rules/strict-string-expressions/allow-empty-types/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-string-expressions": [ 4 | true, 5 | { 6 | "allow-empty-types": true 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/strict-string-expressions/disallow-empty-types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-string-expressions/disallow-empty-types/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-string-expressions": [ 4 | true, 5 | { 6 | "allow-empty-types": false 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/no-strict-null-checks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // strictNullChecks not enabled 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/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/strict-null-checks/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-type-predicates": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/unknown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/rules/strict-type-predicates/unknown/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "strict-type-predicates": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/switch-default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "switch-default": 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/switch-final-break/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "switch-final-break": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/trailing-comma/multiline-always/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "trailing-comma": [true, {"multiline": "always"}] 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/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/trailing-comma/spec-compliant/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "trailing-comma": [ 4 | true, 5 | { 6 | "multiline": "always", 7 | "singleline": "always", 8 | "esSpecCompliant": true 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/triple-equals/allow-null-check/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "triple-equals": [true, "allow-null-check"] 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/type-literal-delimiter/one-liners-with-trailings/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "type-literal-delimiter": [ 4 | true, 5 | { 6 | "singleLine": "always" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/typedef-whitespace/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef-whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typedef/array-destructuring/test.ts.lint: -------------------------------------------------------------------------------- 1 | const [ paramA, paramB ] = [15, 'test']; 2 | ~~~~~~~~~~~~~~~~~~ [expected array-destructuring: '[ paramA, paramB ]' to have a typedef] 3 | 4 | const [ paramA3, paramB3 ]: { number: string, paramB1: string } = [15, 'test']; 5 | -------------------------------------------------------------------------------- /test/rules/typedef/array-destructuring/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "array-destructuring" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/arrow-call-signature-and-parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "parameter", 5 | "call-signature" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/typedef/arrow-call-signature/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "arrow-call-signature" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/arrow-parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "arrow-parameter" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/call-signature/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "call-signature" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/member-variable-declaration/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "member-variable-declaration" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/typedef/object-destructuring/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "object-destructuring" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "parameter" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typedef/variable-declaration/test.ts.lint: -------------------------------------------------------------------------------- 1 | var v = { } 2 | ~ [expected variable-declaration: 'v' to have a typedef] 3 | 4 | const { paramA, paramB } = { paramA: "test", paramB: 15 }; 5 | const [ paramA, paramB ] = [15, 'test']; 6 | -------------------------------------------------------------------------------- /test/rules/typedef/variable-declaration/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typedef": [true, 4 | "variable-declaration" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/typeof-compare/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "typeof-compare": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unified-signatures/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unified-signatures": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-bind/typed/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-bind/typed/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-bind": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-bind/untyped/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-bind": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/unnecessary-constructor/check-super-calls/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-constructor": [ 4 | true, 5 | { "check-super-calls": true } 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/rules/unnecessary-constructor/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-constructor": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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/unnecessary-else/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "unnecessary-else": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/use-default-type-parameter/tsconfig.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/rules/use-default-type-parameter/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "use-default-type-parameter": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/use-isnan/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "use-isnan": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/variable-name/allow-leading-trailing-underscore/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-leading-underscore", "allow-trailing-underscore"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /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/allow-pascal-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-pascal-case"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/variable-name/allow-snake-case/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "allow-snake-case"] 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/variable-name/ban-keywords/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": [true, "ban-keywords"] 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/rules/variable-name/default/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "variable-name": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/all/bom.ts.lint: -------------------------------------------------------------------------------- 1 | import * as $t from 't'; 2 | -------------------------------------------------------------------------------- /test/rules/whitespace/all/import.ts.lint: -------------------------------------------------------------------------------- 1 | [typescript]: >=2.4.0 2 | import('./foo') 3 | .then(foo => { foo.setup(); }); 4 | -------------------------------------------------------------------------------- /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/test.ts.lint: -------------------------------------------------------------------------------- 1 | function() {return 5;} 2 | ~ [missing whitespace] 3 | 4 | function() { 5 | const something: number = 5; 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/whitespace/check-postbrace/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "whitespace": [true, "check-postbrace"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/check-separator/test.ts.lint: -------------------------------------------------------------------------------- 1 | let foo = "bar"; -------------------------------------------------------------------------------- /test/rules/whitespace/check-separator/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "whitespace": [true, "check-separator"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/rules/whitespace/none/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "whitespace": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "no-implicit-dependencies": { 5 | "options": ["dev"] 6 | } 7 | } 8 | } 9 | --------------------------------------------------------------------------------