diff --git a/tools/.eslintrc b/tools/.eslintrc new file mode 100644 index 000000000..9da4e89a3 --- /dev/null +++ b/tools/.eslintrc @@ -0,0 +1,13 @@ +{ + "rules": { + "no-console": [ + 2, + { + "allow": [ + "warn", + "log" + ] + } + ] + } +} diff --git a/tools/dev.server.js b/tools/dev.server.js index ae9e347ef..45371be13 100644 --- a/tools/dev.server.js +++ b/tools/dev.server.js @@ -28,8 +28,8 @@ new WebpackDevServer(compiler, { hash: true, timings: true, chunks: true, - chunkModules: false - } + chunkModules: false, + }, }).listen(4872, 'localhost', function(err) { if (err) { return console.log(err); diff --git a/tools/webpack.config.js b/tools/webpack.config.js index d2a34a754..eadc95850 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -21,64 +21,64 @@ module.exports = { enforce: 'pre', test: /\.js?$/, exclude: /node_modules/, - use: 'eslint-loader' + use: 'eslint-loader', }, /* Normal loader */ { test: /\.js?$/, exclude: /node_modules/, - use: 'babel-loader' + use: 'babel-loader', }, { test: /\.(jpe?g|png|gif|svg)$/, - use: 'file-loader?name=[name].[ext]' + use: 'file-loader?name=[name].[ext]', }, { test: /\.(ttf|eot|woff|woff2|svg)$/, loader: 'url-loader', options: { limit: 50000, - name: 'fonts/[hash].[ext]' - } + name: 'fonts/[hash].[ext]', + }, }, { test: /\.scss$/, exclude: /node_modules/, use: [ { - loader: 'style-loader' + loader: 'style-loader', }, { loader: 'css-loader', options: { sourceMap: true, module: true, - localIdentName: '[path][name]__[local]--[hash:base64:5]' - } + localIdentName: '[path][name]__[local]--[hash:base64:5]', + }, }, { - loader: 'sass-loader' - } - ] + loader: 'sass-loader', + }, + ], }, { test: /\.css$/, use: [ { - loader: 'style-loader' + loader: 'style-loader', }, { - loader: 'css-loader' - } - ] - } - ] + loader: 'css-loader', + }, + ], + }, + ], }, devtool: isDev ? 'source-map' : 'eval', stats: { - children: false - } + children: false, + }, }; diff --git a/tools/webpack.dev.config.babel.js b/tools/webpack.dev.config.babel.js index 138f0b484..f34759467 100644 --- a/tools/webpack.dev.config.babel.js +++ b/tools/webpack.dev.config.babel.js @@ -11,19 +11,19 @@ export default { 'react-hot-loader/patch', 'webpack-dev-server/client?http://localhost:4872', 'webpack/hot/only-dev-server', - `${env.SRC_ROOT}/webui/src/index.js` - ] + `${env.SRC_ROOT}/webui/src/index.js`, + ], }, output: { ...baseConfig.output, - publicPath: '/' + publicPath: '/', }, plugins: [ new webpack.DefinePlugin({ '__DEBUG__': true, - 'process.env.NODE_ENV': '"development"' + 'process.env.NODE_ENV': '"development"', }), new HTMLWebpackPlugin({ title: 'Verdaccio', @@ -35,6 +35,6 @@ export default { }), new webpack.HotModuleReplacementPlugin(), new webpack.NoEmitOnErrorsPlugin(), - new FriendlyErrorsPlugin() - ] + new FriendlyErrorsPlugin(), + ], }; diff --git a/tools/webpack.prod.config.babel.js b/tools/webpack.prod.config.babel.js index f65f50043..1cd1b17bb 100644 --- a/tools/webpack.prod.config.babel.js +++ b/tools/webpack.prod.config.babel.js @@ -23,7 +23,7 @@ const prodConf = { new webpack.optimize.UglifyJsPlugin({ sourceMap: true, compress: { - warnings: false + warnings: false, }, }), new ExtractTextPlugin('style.[contenthash].css'),