diff --git a/docs/usage/configuration/index.md b/docs/usage/configuration/index.md index ad8a39c7641..e9a6f4097db 100644 --- a/docs/usage/configuration/index.md +++ b/docs/usage/configuration/index.md @@ -4,7 +4,7 @@ title: Configuring TSLint permalink: /usage/configuration/ --- -### The `tslint` File +### TSLint Configuration When using [the CLI][0] or many [third-party tools][1], a file named `tslint.json` or `tslint.yaml` is used to configure which rules get run and each of their options. diff --git a/src/configuration.ts b/src/configuration.ts index e18ec73e41b..baa544187dd 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -224,7 +224,8 @@ export function loadConfigurationFromPath(configFilePath?: string, originalFileP try { if (resolvedConfigFileExt === ".json") { rawConfigFile = JSON.parse(stripComments(fileContent)) as RawConfigFile; - } else { // /\.ya?ml/.test(resolvedConfigFileExt) === true + } else { + // choose this branch only if /\.ya?ml/.test(resolvedConfigFileExt) === true rawConfigFile = yaml.safeLoad(fileContent, { // Note: yaml.LoadOptions expects a schema value of type "any", // but this trips up the no-unsafe-any rule.