Skip to content

Commit

Permalink
incorporate feedback from @adidahiya on PR for issue (palantir#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhanschoo committed Nov 7, 2017
1 parent e3bb4c5 commit fdaa6db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/usage/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit fdaa6db

Please sign in to comment.