Skip to content

Commit

Permalink
Merge pull request #39 from RobotlegsJS/tslint
Browse files Browse the repository at this point in the history
Enforce TSLint rules
  • Loading branch information
tiagoschenkel authored Jul 24, 2018
2 parents 6067293 + 25287a6 commit 1fca7fa
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tsconfig.json
tsconfig.test.json
tsfmt.json
tslint.json
tslint.test.json
typings.json
webpack.config.js
yarn.lock
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Place your settings in this file to overwrite default and user settings.
{
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"tslint.configFile": "tslint.test.json"
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

- Update TypeScript Compiler Options (see #38).

- Enforce TSLint rules (see #39).

- Update dev dependencies to latest version.

### [v0.0.5](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-SignalCommandMap/releases/tag/0.0.5) - 2017-09-26
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
"test": "karma start --single-run",
"mocha": "mocha test/**/*.test.ts --require ts-node/register",
"autoformat": "prettier --config .prettierrc --write {src,test}/**/*.ts",
"tslint-check": "tslint-config-prettier-check ./tslint.json",
"tslint-check:src": "tslint-config-prettier-check ./tslint.json",
"tslint-check:test": "tslint-config-prettier-check ./tslint.test.json",
"tslint:src": "tslint --project tsconfig.json",
"tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json",
"tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test",
"clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf dev",
"compile:src": "tsc -d",
"compile:test": "tsc -p tsconfig.test.json -d",
"prepare": "npm run clean-up && npm run compile:src",
"prepublishOnly": "publish-please guard",
"publish-please": "npm run autoformat && npm run clean-up && npm run test && publish-please"
"publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please"
},
"repository": {
"type": "git",
Expand Down
2 changes: 0 additions & 2 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
"no-switch-case-fall-through": false,
"no-this-assignment": false,
"no-unused-expression": true,
"no-unused-variable": true,
"no-unreachable": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": true,
Expand Down
10 changes: 10 additions & 0 deletions tslint.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"./tslint.json"
],
"rules": {
"no-implicit-dependencies": false,
"no-reference": false,
"no-submodule-imports": false
}
}

0 comments on commit 1fca7fa

Please sign in to comment.