Commit a3800b18 authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Remove gulp, add prefer const to tslint

parent 0abdde7f
Pipeline #904 passed with stage
in 16 seconds
...@@ -14,4 +14,3 @@ test_lib-ical: ...@@ -14,4 +14,3 @@ test_lib-ical:
- npm install -g typescript ts-node gulp-cli - npm install -g typescript ts-node gulp-cli
script: script:
- npm test - npm test
- gulp
let gulp = require("gulp");
let ts = require("gulp-typescript");
let tsProject = ts.createProject("./tsconfig.json");
let tslint = require("gulp-tslint");
gulp.task("lint:ts", function() {
return gulp.src("src/**/*.ts")
.pipe(tslint({
formatter: "verbose"
}))
.pipe(tslint.report())
});
gulp.task("compile:ts", ["lint:ts"], function () {
return tsProject.src()
.pipe(tsProject())
.js.pipe(gulp.dest("dist"));
});
gulp.task("test:js", ["compile:ts"], function () {
});
gulp.task("default", ["compile:ts"], function () {
});
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
"dist/" "dist/"
], ],
"scripts": { "scripts": {
"test": "mocha -r ts-node/register src/**/*.spec.ts" "test": "mocha -r ts-node/register src/**/*.spec.ts",
"lint": "tslint -r tslint.json src/**/*.ts"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -22,9 +23,6 @@ ...@@ -22,9 +23,6 @@
"@types/moment-timezone": "^0.2.34", "@types/moment-timezone": "^0.2.34",
"@types/sinon": "^1.16.35", "@types/sinon": "^1.16.35",
"chai": "^3.5.0", "chai": "^3.5.0",
"gulp": "^3.9.1",
"gulp-tslint": "^7.1.0",
"gulp-typescript": "^3.1.5",
"mocha": "^3.2.0", "mocha": "^3.2.0",
"sinon": "^1.17.7", "sinon": "^1.17.7",
"ts-node": "^2.1.0", "ts-node": "^2.1.0",
......
...@@ -14,7 +14,7 @@ describe("ContentLine", () => { ...@@ -14,7 +14,7 @@ describe("ContentLine", () => {
}); });
it("Should create an object", () => { it("Should create an object", () => {
let test = new ContentLine("name", ["param"], "value"); const test = new ContentLine("name", ["param"], "value");
let result = true; let result = true;
if (typeof test === undefined) { if (typeof test === undefined) {
......
...@@ -16,43 +16,43 @@ describe("util", () => { ...@@ -16,43 +16,43 @@ describe("util", () => {
}); });
it("Should return false for numbers", () => { it("Should return false for numbers", () => {
let test = "12345"; const test = "12345";
let result = isAlpha(test); const result = isAlpha(test);
expect(result).to.be.false; expect(result).to.be.false;
}); });
it("Should return false for alpha numerics", () => { it("Should return false for alpha numerics", () => {
let test = "a2a"; const test = "a2a";
let result = isAlpha(test); const result = isAlpha(test);
expect(result).to.be.false; expect(result).to.be.false;
}); });
it("Should return false for non-alpha numerics", () => { it("Should return false for non-alpha numerics", () => {
let test = ".%3adsk)#"; const test = ".%3adsk)#";
let result = isAlpha(test); const result = isAlpha(test);
expect(result).to.be.false; expect(result).to.be.false;
}); });
it("Should return true for lowercase alpha", () => { it("Should return true for lowercase alpha", () => {
let test = "abcdef"; const test = "abcdef";
let result = isAlpha(test); const result = isAlpha(test);
expect(result).to.be.true; expect(result).to.be.true;
}); });
it("Should return true for uppercase alpha", () => { it("Should return true for uppercase alpha", () => {
let test = "ABCDEF"; const test = "ABCDEF";
let result = isAlpha(test); const result = isAlpha(test);
expect(result).to.be.true; expect(result).to.be.true;
}); });
it("Should return true for mixed alpha", () => { it("Should return true for mixed alpha", () => {
let test = "aBcDeF"; const test = "aBcDeF";
let result = isAlpha(test); const result = isAlpha(test);
expect(result).to.be.true; expect(result).to.be.true;
}); });
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
] ]
}, },
"rules": { "rules": {
"prefer-const": true,
"class-name": true, "class-name": true,
"comment-format": [ "comment-format": [
true, true,
...@@ -98,4 +99,4 @@ ...@@ -98,4 +99,4 @@
"check-type" "check-type"
] ]
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment