diff --git a/package.json b/package.json index 22db5ee..db1cda7 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/webpack.config.js b/webpack.config.js index d085f6b..97ecb18 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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/,