Fix ESLint errors

pull/1170/head jitsi-meet_1531
Lyubomir Marinov 9 years ago
parent 111b6e1c27
commit f72e7ffbc2
  1. 24
      webpack.config.js

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

Loading…
Cancel
Save