mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 10:58:34 -05:00
Adds linting to compile step
Reorgs tasks Fixes lint issues
This commit is contained in:
51
.vscode/tasks.json
vendored
51
.vscode/tasks.json
vendored
@@ -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"
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
@@ -864,12 +864,13 @@
|
||||
"*"
|
||||
],
|
||||
"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",
|
||||
|
||||
@@ -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})`);
|
||||
|
||||
@@ -14,5 +14,5 @@ export namespace Functions {
|
||||
|
||||
export function once<T extends Function>(fn: T): T {
|
||||
return _once(fn);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user