Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Killian committed Apr 5, 2016
2 parents 3b8be58 + 8ea204b commit cb1096b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change Log
===

v3.7.0
---
* Stable release containing changes from the last dev release

v3.7.0-dev.1
---
* [enhancement] `extends` field for `tslint.json` files (#997)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"tslint": "next",
"tslint-config-typings": "0.1.6",
"tslint-config-unional": "0.1.5",
"typescript": "latest"
"typescript": "next"
},
"peerDependencies": {
"typescript": ">=1.7.3 || >=1.8.0-dev || >=1.9.0-dev"
Expand Down
4 changes: 3 additions & 1 deletion src/tslint-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import * as fs from "fs";
import * as glob from "glob";
import * as optimist from "optimist";
import * as path from "path";
import * as Linter from "./tslint";
import {
CONFIG_FILENAME,
Expand Down Expand Up @@ -196,6 +197,7 @@ if (argv.c && !fs.existsSync(argv.c)) {
console.error("Invalid option for configuration: " + argv.c);
process.exit(1);
}
const possibleConfigAbsolutePath = argv.c != null ? path.resolve(argv.c) : null;

const processFile = (file: string) => {
if (!fs.existsSync(file)) {
Expand All @@ -204,7 +206,7 @@ const processFile = (file: string) => {
}

const contents = fs.readFileSync(file, "utf8");
const configuration = findConfiguration(argv.c, file);
const configuration = findConfiguration(possibleConfigAbsolutePath, file);

const linter = new Linter(file, contents, {
configuration,
Expand Down
4 changes: 4 additions & 0 deletions test/check-bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ expectOut $? 2 "tslint with with JSON pointing to two custom rules did not find
./bin/tslint -c ./test/config/tslint-custom-rules.json -r ./test/files/custom-rules --force src/tslint.ts
expectOut $? 0 "tslint with with -r pointing to custom rules did not find lint failures"

# make sure path to config without a preceding "./" works on the CLI
./bin/tslint -c test/config/tslint-almost-empty.json src/tslint.ts
expectOut $? 0 "-c relative path without ./ did not work"

# make sure tslint --init generates a file
cd ./bin
if [ -f tslint.json ]; then
Expand Down
1 change: 1 addition & 0 deletions test/config/tslint-almost-empty.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "rules": {} }

0 comments on commit cb1096b

Please sign in to comment.