From 0cd7d1718a5a9e6c1c7ee030e0055990c2f763f1 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Wed, 21 Mar 2018 15:31:40 -0700 Subject: [PATCH] Add tslint-loader --- ui/package.json | 1 + ui/webpack/dev.config.js | 17 +++++++++++++---- ui/webpack/prod.config.js | 9 +++++++++ ui/yarn.lock | 12 +++++++++++- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/ui/package.json b/ui/package.json index 298b91f360..a408750f6a 100644 --- a/ui/package.json +++ b/ui/package.json @@ -98,6 +98,7 @@ "tslib": "^1.9.0", "tslint": "^5.9.1", "tslint-config-prettier": "^1.10.0", + "tslint-loader": "^3.6.0", "tslint-plugin-prettier": "^1.3.0", "tslint-react": "^3.5.1", "typescript": "^2.7.2", diff --git a/ui/webpack/dev.config.js b/ui/webpack/dev.config.js index 1456030123..87806af725 100644 --- a/ui/webpack/dev.config.js +++ b/ui/webpack/dev.config.js @@ -57,14 +57,23 @@ module.exports = { ), ], rules: [ + { + test: /\.ts(x?)$/, + exclude: /node_modules/, + loader: 'tslint-loader', + enforce: 'pre', + options: { + emitWarning: true, + }, + }, { test: /\.js$/, exclude: /node_modules/, loader: 'eslint-loader', enforce: 'pre', options: { - emitWarning: true - } + emitWarning: true, + }, }, { test: /\.scss$/, @@ -198,8 +207,8 @@ module.exports = { children: false, modules: false, version: false, - assetsSort: "!size", - excludeAssets: [/\.(hot-update|woff|eot|ttf|svg|ico|png)/] + assetsSort: '!size', + excludeAssets: [/\.(hot-update|woff|eot|ttf|svg|ico|png)/], }, contentBase: 'build', quiet: false, diff --git a/ui/webpack/prod.config.js b/ui/webpack/prod.config.js index a3fd8f9d8c..bc512ef2fc 100644 --- a/ui/webpack/prod.config.js +++ b/ui/webpack/prod.config.js @@ -54,6 +54,15 @@ const config = { ), ], loaders: [ + { + test: /\.ts(x?)$/, + exclude: /node_modules/, + loader: 'tslint-loader', + enforce: 'pre', + options: { + emitWarning: true, + }, + }, { test: /\.js$/, exclude: [/node_modules/, /(_s|S)pec\.js$/], diff --git a/ui/yarn.lock b/ui/yarn.lock index d511cff7b6..c9a2c24b5d 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -7427,7 +7427,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@2, rimraf@^2.2.8, rimraf@^2.4.4, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -8388,6 +8388,16 @@ tslint-config-prettier@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.10.0.tgz#5063c413d43de4f6988c73727f65ecfc239054ec" +tslint-loader@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/tslint-loader/-/tslint-loader-3.6.0.tgz#12ed4d5ef57d68be25cd12692fb2108b66469d76" + dependencies: + loader-utils "^1.0.2" + mkdirp "^0.5.1" + object-assign "^4.1.1" + rimraf "^2.4.4" + semver "^5.3.0" + tslint-plugin-prettier@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-1.3.0.tgz#7eb65d19ea786a859501a42491b78c5de2031a3f"