Add TS linting.

This commit is contained in:
Alexis Lahouze 2017-08-30 23:13:37 +02:00
parent a650f52fe2
commit 926acd18ae
2 changed files with 27 additions and 0 deletions

View File

@ -7,6 +7,7 @@
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"codelyzer": "^3.1.2",
"css-loader": "^0.28.5",
"ejs-loader": "^0.3.0",
"eslint": "^4.10.0",
@ -34,6 +35,9 @@
"sass-loader": "^6.0.6",
"style-loader": "^0.19.0",
"ts-loader": "^3.1.0",
"tslint": "^5.7.0",
"tslint-config-prettier": "^1.4.0",
"tslint-loader": "^3.5.3",
"typescript": "^2.4.2",
"url-loader": "^0.6.2",
"webpack": "^3.8.1",

View File

@ -63,6 +63,29 @@ module.exports = {
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader'
}, {
// Typescript linting
enforce: 'pre',
test: /\.tsx?$/,
loader: 'tslint-loader',
options: {
configuration: {
extends: [
"tslint:latest",
"codelyzer"
],
rules: {
//quotemark: [true, 'single']
}
},
configFile: 'tslint-custom.json',
emitErrors: true,
failOnHint: true,
typeCheck: true,
tsConfigFile: 'tsconfig.json',
formatter: 'verbose',
formattersDirectory: 'node_modules/tslint/lib/formatters/',
}
}, {
test: /\.tsx?$/,
exclude: /node_modules/,