From 77ba119d5cb0f1ceedd5865c1623a9236a768d9c Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 2 Oct 2017 23:22:36 -0400 Subject: [PATCH] Adds compile pre-commit hook --- .github/ISSUE_TEMPLATE.md | 12 +++++++++ .vscode/tasks.json | 13 ++++----- ISSUE_TEMPLATE.md | 12 --------- package-lock.json | 68 ++++++++++++++++++++++++++++++++++++----------- package.json | 12 +++++---- 5 files changed, 77 insertions(+), 40 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..7917f90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,12 @@ + + +- GitLens Version: +- VSCode Version: +- OS Version: + +Steps to Reproduce: + +1. +2. \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 984bb25..eae239f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -23,19 +23,16 @@ "group": "build", "problemMatcher": [ "$tsc", - { - "base": "$tslint5", - "fileLocation": "relative" - } + "$tslint5" ] }, { + "label": "lint", "type": "npm", "script": "lint", - "problemMatcher": { - "base": "$tslint5", - "fileLocation": "relative" - } + "problemMatcher": [ + "$tslint5" + ] }, { "type": "npm", diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 7917f90..0000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,12 +0,0 @@ - - -- GitLens Version: -- VSCode Version: -- OS Version: - -Steps to Reproduce: - -1. -2. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b2c5767..c54e7e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -260,6 +260,12 @@ } } }, + "ci-info": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", + "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", + "dev": true + }, "clone": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", @@ -1257,6 +1263,17 @@ "sshpk": "1.13.1" } }, + "husky": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", + "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", + "dev": true, + "requires": { + "is-ci": "1.0.10", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" + } + }, "iconv-lite": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", @@ -1295,6 +1312,15 @@ "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", "dev": true }, + "is-ci": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true, + "requires": { + "ci-info": "1.1.1" + } + }, "is-dotfile": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", @@ -1738,6 +1764,15 @@ "requires": { "is-extglob": "1.0.0" } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } } } }, @@ -1852,13 +1887,10 @@ } }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", + "dev": true }, "oauth-sign": { "version": "0.8.2", @@ -2118,9 +2150,9 @@ "dev": true }, "request": { - "version": "2.82.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.82.0.tgz", - "integrity": "sha512-/QWqfmyTfQ4OYs6EhB1h2wQsX9ZxbuNePCvCm0Mdz/mxw73mjdg0D4QdIl0TQBFs35CZmMXLjk0iCGK395CUDg==", + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", "dev": true, "requires": { "aws-sign2": "0.7.0", @@ -2465,6 +2497,12 @@ "strip-bom": "2.0.0" } }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, "supports-color": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", @@ -2575,13 +2613,13 @@ "resolve": "1.4.0", "semver": "5.4.1", "tslib": "1.7.1", - "tsutils": "2.9.0" + "tsutils": "2.10.0" } }, "tsutils": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.9.0.tgz", - "integrity": "sha1-fhU3tVa6tocvp+ZIXf9FsHbVUz0=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.10.0.tgz", + "integrity": "sha1-rpRRHfJlbrBuRCQFb7pcOIiHBAw=", "dev": true, "requires": { "tslib": "1.7.1" @@ -2795,7 +2833,7 @@ "gulp-untar": "0.0.6", "gulp-vinyl-zip": "1.4.0", "mocha": "3.5.3", - "request": "2.82.0", + "request": "2.83.0", "semver": "5.4.1", "source-map-support": "0.4.18", "url-parse": "1.1.9", diff --git a/package.json b/package.json index 64778f7..93d69c6 100644 --- a/package.json +++ b/package.json @@ -2005,14 +2005,15 @@ ], "scripts": { "clean": "git clean -xdf", - "compile": "tslint --project tslint.json && tsc -p ./", + "compile": "npm run lint && tsc -p ./", "watch": "tsc -watch -p ./", "lint": "tslint --project tslint.json", - "pack": "git clean -xdf && vsce package", + "pack": "npm run clean && vsce package", "postinstall": "node ./node_modules/vscode/bin/install", - "pub": "git clean -xdf && vsce publish", - "reset": "git clean -xdf && npm install", - "vscode:prepublish": "npm install --no-save && npm run compile" + "pub": "npm run clean && vsce publish", + "reset": "npm run clean && npm install", + "vscode:prepublish": "npm install --no-save && npm run compile", + "precommit": "npm run compile" }, "dependencies": { "applicationinsights": "0.21.0", @@ -2033,6 +2034,7 @@ "@types/mocha": "2.2.43", "@types/node": "8.0.31", "@types/tmp": "0.0.33", + "husky": "^0.14.3", "mocha": "3.5.3", "tslint": "5.7.0", "typescript": "2.5.3",