Skip to content

Commit 1fca7fa

Browse files
Merge pull request #39 from RobotlegsJS/tslint
Enforce TSLint rules
2 parents 6067293 + 25287a6 commit 1fca7fa

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ tsconfig.json
2020
tsconfig.test.json
2121
tsfmt.json
2222
tslint.json
23+
tslint.test.json
2324
typings.json
2425
webpack.config.js
2526
yarn.lock

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3-
"typescript.tsdk": "node_modules/typescript/lib"
3+
"typescript.tsdk": "node_modules/typescript/lib",
4+
"tslint.configFile": "tslint.test.json"
45
}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
- Update TypeScript Compiler Options (see #38).
2626

27+
- Enforce TSLint rules (see #39).
28+
2729
- Update dev dependencies to latest version.
2830

2931
### [v0.0.5](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-SignalCommandMap/releases/tag/0.0.5) - 2017-09-26

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@
88
"test": "karma start --single-run",
99
"mocha": "mocha test/**/*.test.ts --require ts-node/register",
1010
"autoformat": "prettier --config .prettierrc --write {src,test}/**/*.ts",
11-
"tslint-check": "tslint-config-prettier-check ./tslint.json",
11+
"tslint-check:src": "tslint-config-prettier-check ./tslint.json",
12+
"tslint-check:test": "tslint-config-prettier-check ./tslint.test.json",
13+
"tslint:src": "tslint --project tsconfig.json",
14+
"tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json",
15+
"tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test",
1216
"clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf dev",
1317
"compile:src": "tsc -d",
1418
"compile:test": "tsc -p tsconfig.test.json -d",
1519
"prepare": "npm run clean-up && npm run compile:src",
1620
"prepublishOnly": "publish-please guard",
17-
"publish-please": "npm run autoformat && npm run clean-up && npm run test && publish-please"
21+
"publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please"
1822
},
1923
"repository": {
2024
"type": "git",

tslint.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
"no-switch-case-fall-through": false,
4949
"no-this-assignment": false,
5050
"no-unused-expression": true,
51-
"no-unused-variable": true,
52-
"no-unreachable": true,
5351
"no-use-before-declare": true,
5452
"no-var-keyword": true,
5553
"object-literal-sort-keys": true,

tslint.test.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": [
3+
"./tslint.json"
4+
],
5+
"rules": {
6+
"no-implicit-dependencies": false,
7+
"no-reference": false,
8+
"no-submodule-imports": false
9+
}
10+
}

0 commit comments

Comments
 (0)