From f72e7ffbc2cddcebb3f80e49db8b78430d3ec464 Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Mon, 28 Nov 2016 20:06:23 -0600 Subject: [PATCH] Fix ESLint errors --- webpack.config.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index ffaaf5c9b..0f50eb88c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,8 +8,8 @@ var webpack = require('webpack'); var aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/'; var minimize - = process.argv.indexOf('-p') != -1 - || process.argv.indexOf('--optimize-minimize') != -1; + = process.argv.indexOf('-p') !== -1 + || process.argv.indexOf('--optimize-minimize') !== -1; var node_modules = __dirname + '/node_modules/'; var plugins = [ new HasteResolverPlugin() @@ -32,7 +32,7 @@ if (minimize) { var config = { devtool: 'source-map', module: { - loaders: [{ + loaders: [ { // Transpile ES2015 (aka ES6) to ES5. Accept the JSX syntax by React // as well. @@ -50,20 +50,20 @@ var config = { ].map(require.resolve) }, test: /\.jsx?$/ - },{ + }, { // Expose jquery as the globals $ and jQuery because it is expected // to be available in such a form by multiple jitsi-meet // dependencies including AUI, lib-jitsi-meet. loader: 'expose?$!expose?jQuery', test: /\/node_modules\/jquery\/.*\.js$/ - },{ + }, { // Disable AMD for the Strophe.js library or its imports will fail // at runtime. loader: 'imports?define=>false&this=>window', test: strophe - },{ + }, { // Allow CSS to be imported into JavaScript. loaders: [ @@ -71,7 +71,7 @@ var config = { 'css' ], test: /\.css$/ - },{ + }, { // Emit the static assets of AUI such as images that are referenced // by CSS into the output path. @@ -82,13 +82,15 @@ var config = { name: '[path][name].[ext]' }, test: /\.(gif|png|svg)$/ - },{ - //Adds the ability to import json files. + }, { + // Enable the import of JSON files. + loader: 'json', exclude: node_modules, test: /\.json$/ - }], + } ], noParse: [ + // Do not parse the files of the Strophe.js library or at least // parts of the properties of the Strophe global variable will be // missing and strophejs-plugins will fail at runtime. @@ -122,7 +124,7 @@ var config = { 'jQuery-Impromptu': 'jQuery-Impromptu/dist/jquery-impromptu' + (minimize ? '.min' : '') - + '.js', + + '.js' }, packageAlias: 'browser' }