diff --git a/server.dev.js b/server.dev.js index 73024dca..3461d943 100644 --- a/server.dev.js +++ b/server.dev.js @@ -2,7 +2,6 @@ /* eslint-disable import/no-extraneous-dependencies, import/newline-after-import */ 'use strict'; -const path = require('path'); const removeTrailingSlash = require('remove-trailing-slash'); const WebpackDevServer = require('webpack-dev-server'); diff --git a/server.js b/server.js index 276822aa..674185ff 100644 --- a/server.js +++ b/server.js @@ -1,6 +1,9 @@ +/* eslint-disable strict, no-console */ +'use strict'; + +const path = require('path'); const express = require('express'); const compression = require('compression'); -const path = require('path'); const removeTrailingSlash = require('remove-trailing-slash'); const BASE_PATH = removeTrailingSlash(process.env.ONION_BASE_PATH || '/'); @@ -13,9 +16,10 @@ app.use(compression()); app.use(path.join(BASE_PATH, '/static/js'), express.static(path.resolve(__dirname, 'dist/js'))); app.use(path.join(BASE_PATH, '/static/css'), express.static(path.resolve(__dirname, 'dist/css'))); app.use(path.join(BASE_PATH, '/static/fonts'), express.static(path.resolve(__dirname, 'dist/fonts'))); -app.use(path.join(BASE_PATH, '/static/third_party'), express.static(path.resolve(__dirname, 'dist/third_party'))); +app.use(path.join(BASE_PATH, '/static/third_party'), + express.static(path.resolve(__dirname, 'dist/third_party'))); -app.get(/.*/, function(req, res) { +app.get(/.*/, (req, res) => { console.log('%s %s', req.method, req.path); res.sendFile(path.resolve(__dirname, 'dist/index.html')); }); diff --git a/webpack.config.js b/webpack.config.js index 2efbbee1..3c321f26 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,4 @@ -/* eslint-disable strict, no-console, object-shorthand */ +/* eslint-disable strict, no-console, object-shorthand, prefer-template */ /* eslint-disable import/no-extraneous-dependencies, import/newline-after-import */ 'use strict';