[refactor, chore] Including TSLint; fixing most things.

As it currently stands, bringing in TSLint with *all* rules enabled by
default and override each as we go. This means that as we upgrade and
bring in new rules we might start seeing new rules that the code
violates.

Because all the rules are enabled by default, the choice to explicitly
disable/relax rules can be discussed as part of PRs.

This also brought in strict type checking. This means we shouldn't be
relying on truthy/falsey value coercion. It also means that we will
likely need to create some type definition files or port certain files
over. That...will be a bit tedious, but will make the codebase better as
a whole.
This commit is contained in:
Steven Evans
2018-06-14 14:57:44 -04:00
parent 67cee8642b
commit 9c09e44db2
8 changed files with 312 additions and 86 deletions

View File

@@ -63,6 +63,7 @@
"source-map": "^0.7.3",
"style-loader": "^0.21.0",
"ts-loader": "^4.4.1",
"tslint": "^5.10.0",
"typescript": "^2.9.2",
"url-loader": "^1.0.1",
"watchpack": "^1.6.0",
@@ -86,6 +87,7 @@
"start:dev": "webpack-dev-server",
"build": "webpack --mode production",
"build:dev": "webpack --mode development",
"lint:typescript": "tslint --project . --exclude **/*.d.ts --format stylish src/**/*.ts utils/**/*.ts",
"watch": "webpack --watch --mode production",
"watch:dev": "webpack --watch --mode development"
},