Skip to content
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.

Commit

Permalink
fix: add tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Jun 3, 2019
1 parent 18c0448 commit aac783d
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 8 deletions.
86 changes: 83 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
"description": "",
"main": "build/src/index.js",
"scripts": {
"test": "jest --coverage"
"build": "tsc",
"lint": "tslint --fix -p .",
"test": "npm run lint && jest --coverage"
},
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^24.0.13",
"jest": "^24.8.0",
"ts-jest": "^24.0.2",
"tslint": "^5.17.0",
"typescript": "^3.5.1"
}
}
5 changes: 2 additions & 3 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import helloWorld from "./index";


describe("index", () => {
it("can call hello world", () => {
expect(helloWorld()).toEqual("hello world");
})
})
});
});
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export function helloWorld() {
// hello world
return "hello world";
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"module": "commonjs",
"lib": [
"es2015",
"dom"
Expand Down
12 changes: 12 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": [
"tslint:recommended"
],
"rules": {
"ordered-imports": false,
"object-literal-sort-keys": false,
"no-console": [true, "log"],
"indent": [true, "spaces", 2],
"max-classes-per-file" : false
}
}

0 comments on commit aac783d

Please sign in to comment.