Commit a3800b18 authored by Mark Stenglein's avatar Mark Stenglein

Remove gulp, add prefer const to tslint

parent 0abdde7f
Pipeline #904 passed with stage
in 16 seconds
......@@ -14,4 +14,3 @@ test_lib-ical:
- npm install -g typescript ts-node gulp-cli
script:
- 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 @@
"dist/"
],
"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": {
"type": "git",
......@@ -22,9 +23,6 @@
"@types/moment-timezone": "^0.2.34",
"@types/sinon": "^1.16.35",
"chai": "^3.5.0",
"gulp": "^3.9.1",
"gulp-tslint": "^7.1.0",
"gulp-typescript": "^3.1.5",
"mocha": "^3.2.0",
"sinon": "^1.17.7",
"ts-node": "^2.1.0",
......
......@@ -14,7 +14,7 @@ describe("ContentLine", () => {
});
it("Should create an object", () => {
let test = new ContentLine("name", ["param"], "value");
const test = new ContentLine("name", ["param"], "value");
let result = true;
if (typeof test === undefined) {
......
......@@ -16,43 +16,43 @@ describe("util", () => {
});
it("Should return false for numbers", () => {
let test = "12345";
let result = isAlpha(test);
const test = "12345";
const result = isAlpha(test);
expect(result).to.be.false;
});
it("Should return false for alpha numerics", () => {
let test = "a2a";
let result = isAlpha(test);
const test = "a2a";
const result = isAlpha(test);
expect(result).to.be.false;
});
it("Should return false for non-alpha numerics", () => {
let test = ".%3adsk)#";
let result = isAlpha(test);
const test = ".%3adsk)#";
const result = isAlpha(test);
expect(result).to.be.false;
});
it("Should return true for lowercase alpha", () => {
let test = "abcdef";
let result = isAlpha(test);
const test = "abcdef";
const result = isAlpha(test);
expect(result).to.be.true;
});
it("Should return true for uppercase alpha", () => {
let test = "ABCDEF";
let result = isAlpha(test);
const test = "ABCDEF";
const result = isAlpha(test);
expect(result).to.be.true;
});
it("Should return true for mixed alpha", () => {
let test = "aBcDeF";
let result = isAlpha(test);
const test = "aBcDeF";
const result = isAlpha(test);
expect(result).to.be.true;
});
......
......@@ -44,6 +44,7 @@
]
},
"rules": {
"prefer-const": true,
"class-name": true,
"comment-format": [
true,
......@@ -98,4 +99,4 @@
"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