0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-03-25 02:32:52 -05:00

fix: eslint warnings

This commit is contained in:
Juan Picado @jotadeveloper 2017-07-15 22:04:58 +02:00
parent 1465ce2b92
commit 3738221bf5
No known key found for this signature in database
GPG key ID: 18AC54485952D158
5 changed files with 41 additions and 28 deletions

13
tools/.eslintrc Normal file
View file

@ -0,0 +1,13 @@
{
"rules": {
"no-console": [
2,
{
"allow": [
"warn",
"log"
]
}
]
}
}

View file

@ -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);

View file

@ -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,
},
};

View file

@ -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(),
],
};

View file

@ -23,7 +23,7 @@ const prodConf = {
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
warnings: false,
},
}),
new ExtractTextPlugin('style.[contenthash].css'),