Skip to content

Commit

Permalink
fix tslint config, but it wont print errors for some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
WuTheFWasThat committed Aug 2, 2018
1 parent 3309398 commit f5baada
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 49 deletions.
6 changes: 0 additions & 6 deletions index.d.ts
@@ -1,6 +0,0 @@
// @types/react-color exists but doesn't work
declare module 'react-color' {
export const PhotoshopPicker: any;
export const SketchPicker: any;
export const ChromePicker: any;
}
103 changes: 81 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -18,6 +18,7 @@
"verify": "npm run lint && npm run typecheck && npm test"
},
"dependencies": {
"@types/react-color": "^2.13.5",
"express": "^4.16.3",
"lodash": "^4.17.10",
"minimist": "^1.2.0",
Expand All @@ -37,7 +38,7 @@
"@types/webpack": "^4.4.8",
"@types/webpack-dev-server": "^2.4.0",
"@types/ws": "0.0.41",
"awesome-typescript-loader": "^3.1.3",
"awesome-typescript-loader": "^5.2.0",
"core-js": "^2.4.1",
"css-loader": "^0.23.1",
"file-loader": "^0.9.0",
Expand All @@ -57,7 +58,7 @@
"style-loader": "^0.13.1",
"ts-node": "^3.1.0",
"tslint": "^4.5.1",
"tslint-loader": "^3.5.3",
"tslint-loader": "^3.6.0",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-dev-server": "^3.1.5"
Expand Down
53 changes: 34 additions & 19 deletions src/server/webpack_configs.ts
Expand Up @@ -27,8 +27,18 @@ export function getDevConfig(config: BuildConfig = {}): webpack.Configuration {
rules: [
{
test: /\.tsx?$/,
enforce: 'pre',
use: [
'react-hot-loader', 'awesome-typescript-loader', 'tslint-loader',
{
loader: 'tslint-loader',
options: { emitErrors: false, failOnHint: false, }
},
],
},
{
test: /\.tsx?$/,
use: [
'react-hot-loader', 'awesome-typescript-loader',
],
include: srcdir
},
Expand Down Expand Up @@ -58,10 +68,6 @@ export function getDevConfig(config: BuildConfig = {}): webpack.Configuration {
new CheckerPlugin(),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
emitErrors: true,
failOnHint: true
},
css: {
sourceMap: true,
root: '/build',
Expand All @@ -73,6 +79,7 @@ export function getDevConfig(config: BuildConfig = {}): webpack.Configuration {
resolve: {
extensions: ['.jsx', '.js', '.tsx', '.ts']
},
stats: 'verbose'
};
}

Expand All @@ -84,10 +91,20 @@ export function getProdConfig(config: BuildConfig = {}): webpack.Configuration {
entry: `${srcdir}/assets/ts/app.tsx`,
module: {
rules: [
{
test: /\.tsx?$/,
enforce: 'pre',
use: [
{
loader: 'tslint-loader',
options: { emitErrors: true, failOnHint: true, }
},
],
},
{
test: /\.tsx?$/,
use: [
'awesome-typescript-loader', 'tslint-loader',
'awesome-typescript-loader',
],
include: srcdir
},
Expand Down Expand Up @@ -119,10 +136,6 @@ export function getProdConfig(config: BuildConfig = {}): webpack.Configuration {
new CheckerPlugin(),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
emitErrors: true,
failOnHint: true
},
css: {
sourceMap: true,
root: '/build',
Expand Down Expand Up @@ -153,10 +166,20 @@ export function getProdServerConfig(config: BuildConfig = {}): webpack.Configura
externals: nodeModules,
module: {
rules: [
{
test: /\.tsx?$/,
enforce: 'pre',
use: [
{
loader: 'tslint-loader',
options: { emitErrors: true, failOnHint: true, }
},
],
},
{
test: /\.ts$/,
use: [
'awesome-typescript-loader', 'tslint-loader',
'awesome-typescript-loader'
],
include: srcdir
},
Expand All @@ -172,14 +195,6 @@ export function getProdServerConfig(config: BuildConfig = {}): webpack.Configura
},
plugins: [
new CheckerPlugin(),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
emitErrors: true,
failOnHint: true
},
}
}),
],
resolve: {
extensions: ['.js', '.ts']
Expand Down

0 comments on commit f5baada

Please sign in to comment.