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:
parent
1465ce2b92
commit
3738221bf5
5 changed files with 41 additions and 28 deletions
13
tools/.eslintrc
Normal file
13
tools/.eslintrc
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"rules": {
|
||||
"no-console": [
|
||||
2,
|
||||
{
|
||||
"allow": [
|
||||
"warn",
|
||||
"log"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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(),
|
||||
],
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ const prodConf = {
|
|||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: true,
|
||||
compress: {
|
||||
warnings: false
|
||||
warnings: false,
|
||||
},
|
||||
}),
|
||||
new ExtractTextPlugin('style.[contenthash].css'),
|
||||
|
|
Loading…
Add table
Reference in a new issue