From 9bea83617fa41d5983df0df6d58d64b525ccff69 Mon Sep 17 00:00:00 2001 From: Slava Bacherikov Date: Sat, 20 Jan 2018 00:45:34 +0200 Subject: [PATCH] Update tsconfig and tslint, fix issues --- src/fsi.ts | 2 +- src/phoenix.ts | 4 ++-- tsconfig.json | 8 +++++--- tslint.json | 8 +++++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/fsi.ts b/src/fsi.ts index 472ba8d..096d657 100644 --- a/src/fsi.ts +++ b/src/fsi.ts @@ -116,7 +116,7 @@ function fsi20DecNewKeygen(serial: string): string { "9137605284", "3974018625", "8052974163" ]; - return [0, 2, 5, 11, 13, 15, 16].map((val, i, arr) => { + return [0, 2, 5, 11, 13, 15, 16].map((val, i) => { let temp = parseInt(serial.charAt(val), 10); return fKeys[i].charAt(temp); }).join(""); diff --git a/src/phoenix.ts b/src/phoenix.ts index daa73af..ac58e31 100644 --- a/src/phoenix.ts +++ b/src/phoenix.ts @@ -1,6 +1,6 @@ /* tslint:disable:no-bitwise */ import { - asciiToKeyboardEnc, keyboardEncToAscii, makeSolver, reversedScanCodes, Solver + asciiToKeyboardEnc, keyboardEncToAscii, reversedScanCodes, Solver } from "./utils"; export const enum PhoenixErrors { @@ -36,7 +36,7 @@ const digitsOnly: string[] = "123456789".split(""); const lettersOnly: string[] = "abcdefghijklmnopqrstuvwxyz".split(""); -const alphaNumeric: string[] = lettersOnly.concat(digitsOnly); +// const alphaNumeric: string[] = lettersOnly.concat(digitsOnly); const defaultPhoenix: PhoenixInfo = { shift: 0, diff --git a/tsconfig.json b/tsconfig.json index d6fb44d..49a83f7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,14 +3,16 @@ "module": "commonjs", "target": "es3", "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "strictNullChecks": true, + "strict": true, "sourceMap": true, + "rootDir": "src/", "outDir": "dist/" }, "exclude": [ "node_modules" - ], - "files": [ - "src/*.ts" ] } diff --git a/tslint.json b/tslint.json index 828c857..32a0cf8 100644 --- a/tslint.json +++ b/tslint.json @@ -11,7 +11,13 @@ "interface-name": [true, "never-prefix"], "object-literal-key-quotes": false, "object-literal-sort-keys": false, - "no-namespace": false + "class-name": true, + "no-eval": true, + "eofline": true, + "indent": [true, "spaces", 4], + "no-null-keyword": true, + "encoding": true, + "no-namespace": true }, "rulesDirectory": [] }