Adds linting to compile step

Reorgs tasks
Fixes lint issues
This commit is contained in:
Eric Amodio
2017-05-01 13:17:50 -04:00
parent 564856853a
commit ba346da54b
5 changed files with 47 additions and 56 deletions

51
.vscode/tasks.json vendored
View File

@@ -9,36 +9,27 @@
// A task runner that calls a custom npm script that compiles the extension.
{
"version": "2.0.0",
"command": "npm",
"args": ["run"],
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"tasks": [{
"taskName": "compile",
"args": ["compile", "--loglevel", "silent"],
"isBuildCommand": true,
"isBackground": true,
"problemMatcher": "$tsc-watch"
}, {
"taskName": "tslint",
"args": ["lint", "--loglevel", "silent"],
"isBackground": true,
"problemMatcher": {
"owner": "tslint",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"severity": "warning",
"pattern": {
"regexp": "^(\\S.*)\\[(\\d+), (\\d+)\\]:\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
"tasks": [
{
"taskName": "compile",
"command": "npm run compile",
"isBuildCommand": true,
"isShellCommand": true,
"problemMatcher": [ "$tsc", "$tslint5" ]
},
{
"taskName": "lint",
"command": "npm run lint",
"isShellCommand": true,
"problemMatcher": "$tslint5"
},
{
"taskName": "watch",
"command": "npm run watch",
"isBackground": true,
"isShellCommand": true,
"problemMatcher": "$tsc-watch"
}
}]
]
}

View File

@@ -864,34 +864,35 @@
"*"
],
"scripts": {
"compile": "tsc -watch -p ./",
"compile": "npm run lint && tsc -p ./",
"watch": "tsc -watch -p ./",
"lint": "tslint --project tslint.json",
"pack": "git clean -xdf && npm install && vsce package",
"pack": "git clean -xdf --exclude=node_modules/ && vsce package",
"postinstall": "node ./node_modules/vscode/bin/install",
"pub": "git clean -xdf --exclude=node_modules/ && npm install && vsce publish",
"vscode:prepublish": "tsc -p ./"
"pub": "git clean -xdf && vsce publish",
"vscode:prepublish": "npm install && npm run compile"
},
"dependencies": {
"applicationinsights": "0.19.0",
"copy-paste": "1.3.0",
"ignore": "3.2.7",
"lodash.debounce": "4.0.8",
"applicationinsights": "0.19.0",
"copy-paste": "1.3.0",
"ignore": "3.2.7",
"lodash.debounce": "4.0.8",
"lodash.escaperegexp": "4.1.2",
"lodash.isequal": "4.5.0",
"lodash.once": "4.1.1",
"moment": "2.18.1",
"spawn-rx": "2.0.10",
"tmp": "0.0.31"
"lodash.isequal": "4.5.0",
"lodash.once": "4.1.1",
"moment": "2.18.1",
"spawn-rx": "2.0.10",
"tmp": "0.0.31"
},
"devDependencies": {
"@types/applicationinsights": "0.15.33",
"@types/copy-paste": "1.1.30",
"@types/mocha": "2.2.41",
"@types/node": "7.0.14",
"@types/tmp": "0.0.32",
"mocha": "3.3.0",
"tslint": "5.1.0",
"typescript": "2.3.2",
"vscode": "1.1.0"
"@types/applicationinsights": "0.15.33",
"@types/copy-paste": "1.1.30",
"@types/mocha": "2.2.41",
"@types/node": "7.0.14",
"@types/tmp": "0.0.32",
"mocha": "3.3.0",
"tslint": "5.1.0",
"typescript": "2.3.2",
"vscode": "1.1.0"
}
}

View File

@@ -382,7 +382,7 @@ export class GitService extends Disposable {
return undefined;
}
};
}
async getBlameForLine(uri: GitUri, line: number): Promise<IGitBlameLine | undefined> {
Logger.log(`getBlameForLine('${uri.repoPath}', '${uri.fsPath}', ${line}, ${uri.sha})`);
@@ -665,7 +665,7 @@ export class GitService extends Disposable {
return undefined;
}
};
}
async getLogLocations(uri: GitUri, selectedSha?: string, line?: number): Promise<Location[] | undefined> {
Logger.log(`getLogLocations('${uri.repoPath}', '${uri.fsPath}', ${uri.sha}, ${selectedSha}, ${line})`);

View File

@@ -14,5 +14,5 @@ export namespace Functions {
export function once<T extends Function>(fn: T): T {
return _once(fn);
};
}
}

View File

@@ -19,7 +19,6 @@
"no-trailing-whitespace": true,
"no-unsafe-finally": true,
"no-unused-expression": false,
"no-unused-new": true,
"no-var-keyword": true,
"no-var-requires": false,
"object-literal-key-quotes": [