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.
|
// A task runner that calls a custom npm script that compiles the extension.
|
||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"command": "npm",
|
|
||||||
"args": ["run"],
|
|
||||||
"isShellCommand": true,
|
|
||||||
"showOutput": "always",
|
"showOutput": "always",
|
||||||
"suppressTaskName": true,
|
"tasks": [
|
||||||
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
|
{
|
||||||
"tasks": [{
|
"taskName": "compile",
|
||||||
"taskName": "compile",
|
"command": "npm run compile",
|
||||||
"args": ["compile", "--loglevel", "silent"],
|
"isBuildCommand": true,
|
||||||
"isBuildCommand": true,
|
"isShellCommand": true,
|
||||||
"isBackground": true,
|
"problemMatcher": [ "$tsc", "$tslint5" ]
|
||||||
"problemMatcher": "$tsc-watch"
|
},
|
||||||
}, {
|
{
|
||||||
"taskName": "tslint",
|
"taskName": "lint",
|
||||||
"args": ["lint", "--loglevel", "silent"],
|
"command": "npm run lint",
|
||||||
"isBackground": true,
|
"isShellCommand": true,
|
||||||
"problemMatcher": {
|
"problemMatcher": "$tslint5"
|
||||||
"owner": "tslint",
|
},
|
||||||
"fileLocation": [
|
{
|
||||||
"relative",
|
"taskName": "watch",
|
||||||
"${workspaceRoot}"
|
"command": "npm run watch",
|
||||||
],
|
"isBackground": true,
|
||||||
"severity": "warning",
|
"isShellCommand": true,
|
||||||
"pattern": {
|
"problemMatcher": "$tsc-watch"
|
||||||
"regexp": "^(\\S.*)\\[(\\d+), (\\d+)\\]:\\s+(.*)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"column": 3,
|
|
||||||
"message": 4
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}]
|
]
|
||||||
}
|
}
|
||||||
45
package.json
45
package.json
@@ -864,34 +864,35 @@
|
|||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "tsc -watch -p ./",
|
"compile": "npm run lint && tsc -p ./",
|
||||||
|
"watch": "tsc -watch -p ./",
|
||||||
"lint": "tslint --project tslint.json",
|
"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",
|
"postinstall": "node ./node_modules/vscode/bin/install",
|
||||||
"pub": "git clean -xdf --exclude=node_modules/ && npm install && vsce publish",
|
"pub": "git clean -xdf && vsce publish",
|
||||||
"vscode:prepublish": "tsc -p ./"
|
"vscode:prepublish": "npm install && npm run compile"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"applicationinsights": "0.19.0",
|
"applicationinsights": "0.19.0",
|
||||||
"copy-paste": "1.3.0",
|
"copy-paste": "1.3.0",
|
||||||
"ignore": "3.2.7",
|
"ignore": "3.2.7",
|
||||||
"lodash.debounce": "4.0.8",
|
"lodash.debounce": "4.0.8",
|
||||||
"lodash.escaperegexp": "4.1.2",
|
"lodash.escaperegexp": "4.1.2",
|
||||||
"lodash.isequal": "4.5.0",
|
"lodash.isequal": "4.5.0",
|
||||||
"lodash.once": "4.1.1",
|
"lodash.once": "4.1.1",
|
||||||
"moment": "2.18.1",
|
"moment": "2.18.1",
|
||||||
"spawn-rx": "2.0.10",
|
"spawn-rx": "2.0.10",
|
||||||
"tmp": "0.0.31"
|
"tmp": "0.0.31"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/applicationinsights": "0.15.33",
|
"@types/applicationinsights": "0.15.33",
|
||||||
"@types/copy-paste": "1.1.30",
|
"@types/copy-paste": "1.1.30",
|
||||||
"@types/mocha": "2.2.41",
|
"@types/mocha": "2.2.41",
|
||||||
"@types/node": "7.0.14",
|
"@types/node": "7.0.14",
|
||||||
"@types/tmp": "0.0.32",
|
"@types/tmp": "0.0.32",
|
||||||
"mocha": "3.3.0",
|
"mocha": "3.3.0",
|
||||||
"tslint": "5.1.0",
|
"tslint": "5.1.0",
|
||||||
"typescript": "2.3.2",
|
"typescript": "2.3.2",
|
||||||
"vscode": "1.1.0"
|
"vscode": "1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,7 +382,7 @@ export class GitService extends Disposable {
|
|||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
async getBlameForLine(uri: GitUri, line: number): Promise<IGitBlameLine | undefined> {
|
async getBlameForLine(uri: GitUri, line: number): Promise<IGitBlameLine | undefined> {
|
||||||
Logger.log(`getBlameForLine('${uri.repoPath}', '${uri.fsPath}', ${line}, ${uri.sha})`);
|
Logger.log(`getBlameForLine('${uri.repoPath}', '${uri.fsPath}', ${line}, ${uri.sha})`);
|
||||||
@@ -665,7 +665,7 @@ export class GitService extends Disposable {
|
|||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
async getLogLocations(uri: GitUri, selectedSha?: string, line?: number): Promise<Location[] | undefined> {
|
async getLogLocations(uri: GitUri, selectedSha?: string, line?: number): Promise<Location[] | undefined> {
|
||||||
Logger.log(`getLogLocations('${uri.repoPath}', '${uri.fsPath}', ${uri.sha}, ${selectedSha}, ${line})`);
|
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 {
|
export function once<T extends Function>(fn: T): T {
|
||||||
return _once(fn);
|
return _once(fn);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
"no-trailing-whitespace": true,
|
"no-trailing-whitespace": true,
|
||||||
"no-unsafe-finally": true,
|
"no-unsafe-finally": true,
|
||||||
"no-unused-expression": false,
|
"no-unused-expression": false,
|
||||||
"no-unused-new": true,
|
|
||||||
"no-var-keyword": true,
|
"no-var-keyword": true,
|
||||||
"no-var-requires": false,
|
"no-var-requires": false,
|
||||||
"object-literal-key-quotes": [
|
"object-literal-key-quotes": [
|
||||||
|
|||||||
Reference in New Issue
Block a user