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

Use commander instead of optimist for CLI arguments #2689

Merged
merged 9 commits into from
May 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"dependencies": {
"babel-code-frame": "^6.22.0",
"colors": "^1.1.2",
"commander": "^2.9.0",
"diff": "^3.2.0",
"glob": "^7.1.1",
"optimist": "~0.6.0",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.7.1",
Expand All @@ -53,12 +53,12 @@
"@types/babel-code-frame": "^6.20.0",
"@types/chai": "^3.5.0",
"@types/colors": "^1.1.3",
"@types/commander": "^2.9.0",
"@types/diff": "^3.2.0",
"@types/glob": "^5.0.30",
"@types/js-yaml": "^3.5.29",
"@types/mocha": "^2.2.35",
"@types/node": "^7.0.16",
"@types/optimist": "^0.0.29",
"@types/resolve": "^0.0.4",
"@types/semver": "^5.3.30",
"chai": "^3.5.0",
Expand Down
10 changes: 0 additions & 10 deletions src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ export interface IRunnerOptions {
* Whether to enable type checking when linting a project.
*/
typeCheck?: boolean;

/**
* Whether to show the current TSLint version.
*/
version?: boolean;
}

export class Runner {
Expand All @@ -118,11 +113,6 @@ export class Runner {
constructor(private options: IRunnerOptions, private outputStream: NodeJS.WritableStream) { }

public run(onComplete: (status: number) => void) {
if (this.options.version) {
this.outputStream.write(Linter.VERSION + "\n");
return onComplete(0);
}

if (this.options.init) {
if (fs.existsSync(CONFIG_FILENAME)) {
console.error(`Cannot generate ${CONFIG_FILENAME}: file already exists`);
Expand Down
Loading