diff --git a/.eslintignore b/.eslintignore index 6dddc5380b8..f8d8b5a2bc4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,4 +4,5 @@ node_modules/ **/vendor/ **/l10n/ **/js/* -*.config.js \ No newline at end of file +*.config.js +tests/lib/ diff --git a/apps/comments/src/comments.js b/apps/comments/src/comments.js index 3d7f52f4e74..75bb97138c3 100644 --- a/apps/comments/src/comments.js +++ b/apps/comments/src/comments.js @@ -1,5 +1,4 @@ import './app' -import './templates' import './filesplugin' import './activitytabviewplugin' diff --git a/apps/comments/src/templates.js b/apps/comments/src/templates.js deleted file mode 100644 index 26ca658c772..00000000000 --- a/apps/comments/src/templates.js +++ /dev/null @@ -1,123 +0,0 @@ -(function() { - var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {}; -templates['comment'] = template({"1":function(container,depth0,helpers,partials,data) { - return " unread"; -},"3":function(container,depth0,helpers,partials,data) { - return " collapsed"; -},"5":function(container,depth0,helpers,partials,data) { - return " currentUser"; -},"7":function(container,depth0,helpers,partials,data) { - var helper; - - return "data-username=\"" - + container.escapeExpression(((helper = (helper = helpers.actorId || (depth0 != null ? depth0.actorId : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"actorId","hash":{},"data":data}) : helper))) - + "\""; -},"9":function(container,depth0,helpers,partials,data) { - return " \n
\n"; -},"11":function(container,depth0,helpers,partials,data) { - return "
\n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return "
  • \n
    \n
    \n
    " - + alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"actorDisplayName","hash":{},"data":data}) : helper))) - + "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isUserAuthor : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    " - + alias4(((helper = (helper = helpers.date || (depth0 != null ? depth0.date : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"date","hash":{},"data":data}) : helper))) - + "
    \n
    \n
    " - + ((stack1 = ((helper = (helper = helpers.formattedMessage || (depth0 != null ? depth0.formattedMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"formattedMessage","hash":{},"data":data}) : helper))) != null ? stack1 : "") - + "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLong : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
  • \n"; -},"useData":true}); -templates['commentsmodifymenu'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return "
  • \n \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") - + " " - + alias4(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"displayName","hash":{},"data":data}) : helper))) - + "\n \n
  • \n"; -},"2":function(container,depth0,helpers,partials,data) { - var helper; - - return " \n"; -},"4":function(container,depth0,helpers,partials,data) { - return " \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1; - - return "\n"; -},"useData":true}); -templates['edit_comment'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper; - - return "
    \n \n
    \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return "<" - + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tag","hash":{},"data":data}) : helper))) - + " class=\"newCommentRow comment\" data-id=\"" - + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper))) - + "\">\n
    \n
    \n
    " - + alias4(((helper = (helper = helpers.actorDisplayName || (depth0 != null ? depth0.actorDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"actorDisplayName","hash":{},"data":data}) : helper))) - + "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isEditMode : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    \n
    \n
    " - + alias4(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"message","hash":{},"data":data}) : helper))) - + "
    \n \n
    \n
    \n\n"; -},"useData":true}); -templates['filesplugin'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return "\n \n\n"; -},"useData":true}); -templates['view'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return "\n
    \n

    " - + alias4(((helper = (helper = helpers.emptyResultLabel || (depth0 != null ? depth0.emptyResultLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"emptyResultLabel","hash":{},"data":data}) : helper))) - + "

    \n\n
    \n"; -},"useData":true}); -})(); \ No newline at end of file diff --git a/apps/dashboard/webpack.js b/apps/dashboard/webpack.js index ac455498920..f5ab624a9a9 100644 --- a/apps/dashboard/webpack.js +++ b/apps/dashboard/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, './js'), publicPath: '/js/', filename: 'dashboard.js', - jsonpFunction: 'webpackJsonpDashboard' - } + jsonpFunction: 'webpackJsonpDashboard', + }, } diff --git a/apps/files/src/templates.js b/apps/files/src/templates.js index be41e864854..ec219f2c91e 100644 --- a/apps/files/src/templates.js +++ b/apps/files/src/templates.js @@ -29,7 +29,6 @@ import axios from '@nextcloud/axios' import Vue from 'vue' import TemplatePickerView from './views/TemplatePicker' -import { getCurrentUser } from '@nextcloud/auth' import { showError } from '@nextcloud/dialogs' // Set up logger diff --git a/apps/files/webpack.js b/apps/files/webpack.js index 8dbbad5081f..e83f14ad4e7 100644 --- a/apps/files/webpack.js +++ b/apps/files/webpack.js @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require('path') module.exports = { entry: { @@ -11,6 +11,6 @@ module.exports = { path: path.resolve(__dirname, './js/dist/'), publicPath: '/js/', filename: '[name].js', - chunkFilename: 'files.[id].js' - } + chunkFilename: 'files.[id].js', + }, } diff --git a/apps/files_external/tests/appSpec.js b/apps/files_external/tests/appSpec.js index a834d96e2c0..fa969f289f0 100644 --- a/apps/files_external/tests/appSpec.js +++ b/apps/files_external/tests/appSpec.js @@ -20,80 +20,80 @@ */ describe('OCA.Files_External.App tests', function() { - var App = OCA.Files_External.App; - var fileList; + const App = OCA.Files_External.App + let fileList beforeEach(function() { $('#testArea').append( - '
    ' + - '
    ' + - '
    ' + - '' + - '' + - '
    ' + - '' - ); - fileList = App.initList($('#app-content-extstoragemounts')); - }); + '
    ' + + '
    ' + + '
    ' + + '' + + '' + + '
    ' + + '' + ) + fileList = App.initList($('#app-content-extstoragemounts')) + }) afterEach(function() { - App.fileList = null; - fileList.destroy(); - fileList = null; - }); + App.fileList = null + fileList.destroy() + fileList = null + }) describe('initialization', function() { it('inits external mounts list on show', function() { - expect(App.fileList).toBeDefined(); - }); - }); + expect(App.fileList).toBeDefined() + }) + }) describe('file actions', function() { it('provides default file actions', function() { - var fileActions = fileList.fileActions; + const fileActions = fileList.fileActions - expect(fileActions.actions.all).toBeDefined(); - expect(fileActions.actions.all.Delete).toBeDefined(); - expect(fileActions.actions.all.Rename).toBeDefined(); - expect(fileActions.actions.all.Download).toBeDefined(); + expect(fileActions.actions.all).toBeDefined() + expect(fileActions.actions.all.Delete).toBeDefined() + expect(fileActions.actions.all.Rename).toBeDefined() + expect(fileActions.actions.all.Download).toBeDefined() - expect(fileActions.defaults.dir).toEqual('Open'); - }); + expect(fileActions.defaults.dir).toEqual('Open') + }) it('redirects to files app when opening a directory', function() { - var oldList = OCA.Files.App.fileList; + const oldList = OCA.Files.App.fileList // dummy new list to make sure it exists - OCA.Files.App.fileList = new OCA.Files.FileList($('
    ')); + OCA.Files.App.fileList = new OCA.Files.FileList($('
    ')) - var setActiveViewStub = sinon.stub(OCA.Files.App, 'setActiveView'); + const setActiveViewStub = sinon.stub(OCA.Files.App, 'setActiveView') // create dummy table so we can click the dom - var $table = '
    '; - $('#app-content-extstoragemounts').append($table); + const $table = '
    ' + $('#app-content-extstoragemounts').append($table) - App._inFileList = null; - fileList = App.initList($('#app-content-extstoragemounts')); + App._inFileList = null + fileList = App.initList($('#app-content-extstoragemounts')) fileList.setFiles([{ name: 'testdir', type: 'dir', path: '/somewhere/inside/subdir', counterParts: ['user2'], - shareOwner: 'user2' - }]); + shareOwner: 'user2', + }]) - fileList.findFileEl('testdir').find('td a.name').click(); + fileList.findFileEl('testdir').find('td a.name').click() - expect(OCA.Files.App.fileList.getCurrentDirectory()).toEqual('/somewhere/inside/subdir/testdir'); + expect(OCA.Files.App.fileList.getCurrentDirectory()).toEqual('/somewhere/inside/subdir/testdir') - expect(setActiveViewStub.calledOnce).toEqual(true); - expect(setActiveViewStub.calledWith('files')).toEqual(true); + expect(setActiveViewStub.calledOnce).toEqual(true) + expect(setActiveViewStub.calledWith('files')).toEqual(true) - setActiveViewStub.restore(); + setActiveViewStub.restore() // restore old list - OCA.Files.App.fileList = oldList; - }); - }); -}); + OCA.Files.App.fileList = oldList + }) + }) +}) diff --git a/apps/files_sharing/src/collaborationresources.js b/apps/files_sharing/src/collaborationresources.js index 68cea9e59d3..b724c6f93a4 100644 --- a/apps/files_sharing/src/collaborationresources.js +++ b/apps/files_sharing/src/collaborationresources.js @@ -39,5 +39,5 @@ Vue.use(Vuex) export { Vue, - View + View, } diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index 4baafcd96bc..d31c7ef6e3f 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -30,8 +30,8 @@ :menu-position="'left'" :url="share.shareWithAvatar" />
    {{ title }}

    diff --git a/apps/files_sharing/src/views/CollaborationView.vue b/apps/files_sharing/src/views/CollaborationView.vue index 5cfcd299cce..a3249f8b5c7 100644 --- a/apps/files_sharing/src/views/CollaborationView.vue +++ b/apps/files_sharing/src/views/CollaborationView.vue @@ -33,7 +33,7 @@ import { CollectionList } from 'nextcloud-vue-collections' export default { name: 'CollaborationView', components: { - CollectionList + CollectionList, }, computed: { fileId() { @@ -47,7 +47,7 @@ export default { return '' + this.$root.model.name } return '' - } - } + }, + }, } diff --git a/apps/files_sharing/webpack.js b/apps/files_sharing/webpack.js index a05e1b9d15a..ed1d28fe4da 100644 --- a/apps/files_sharing/webpack.js +++ b/apps/files_sharing/webpack.js @@ -1,12 +1,12 @@ -const path = require('path'); +const path = require('path') module.exports = { entry: { - 'additionalScripts': path.join(__dirname, 'src', 'additionalScripts.js'), - 'collaboration': path.join(__dirname, 'src', 'collaborationresourceshandler.js'), - 'files_sharing_tab': path.join(__dirname, 'src', 'files_sharing_tab.js'), - 'files_sharing': path.join(__dirname, 'src', 'files_sharing.js'), - 'main': path.join(__dirname, 'src', 'index.js'), + additionalScripts: path.join(__dirname, 'src', 'additionalScripts.js'), + collaboration: path.join(__dirname, 'src', 'collaborationresourceshandler.js'), + files_sharing_tab: path.join(__dirname, 'src', 'files_sharing_tab.js'), + files_sharing: path.join(__dirname, 'src', 'files_sharing.js'), + main: path.join(__dirname, 'src', 'index.js'), 'personal-settings': path.join(__dirname, 'src', 'personal-settings.js'), }, output: { @@ -14,6 +14,6 @@ module.exports = { publicPath: '/js/', filename: '[name].js', chunkFilename: 'files_sharing.[id].js?v=[chunkhash]', - jsonpFunction: 'webpackJsonpFilesSharing' - } + jsonpFunction: 'webpackJsonpFilesSharing', + }, } diff --git a/apps/files_trashbin/webpack.js b/apps/files_trashbin/webpack.js index 1856c08ae80..efe4330ef04 100644 --- a/apps/files_trashbin/webpack.js +++ b/apps/files_trashbin/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, './js'), publicPath: '/js/', filename: 'files_trashbin.js', - jsonpFunction: 'webpackJsonpFilesTrashbin' - } + jsonpFunction: 'webpackJsonpFilesTrashbin', + }, } diff --git a/apps/files_versions/webpack.js b/apps/files_versions/webpack.js index 8d02db2d73e..89d545b7382 100644 --- a/apps/files_versions/webpack.js +++ b/apps/files_versions/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, 'js'), publicPath: '/js/', filename: 'files_versions.js', - jsonpFunction: 'webpackJsonpFilesVersions' - } + jsonpFunction: 'webpackJsonpFilesVersions', + }, } diff --git a/apps/oauth2/src/App.vue b/apps/oauth2/src/App.vue index 86243b63ee6..ce3c8d95099 100644 --- a/apps/oauth2/src/App.vue +++ b/apps/oauth2/src/App.vue @@ -28,9 +28,7 @@ - + diff --git a/apps/oauth2/webpack.js b/apps/oauth2/webpack.js index 23b9b76b31b..f8f65bc94d7 100644 --- a/apps/oauth2/webpack.js +++ b/apps/oauth2/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, './js'), publicPath: '/js', filename: 'oauth2.js', - jsonpFunction: 'webpackJsonpOauth' - } + jsonpFunction: 'webpackJsonpOauth', + }, } diff --git a/apps/settings/src/components/popoverMenu.vue b/apps/settings/src/components/popoverMenu.vue deleted file mode 100644 index dd9a29cc9fe..00000000000 --- a/apps/settings/src/components/popoverMenu.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - diff --git a/apps/systemtags/webpack.js b/apps/systemtags/webpack.js index b22e0b7e52a..3d568bf7d8c 100644 --- a/apps/systemtags/webpack.js +++ b/apps/systemtags/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, './js'), publicPath: '/js/', filename: 'systemtags.js', - jsonpFunction: 'webpackJsonpSystemtags' - } + jsonpFunction: 'webpackJsonpSystemtags', + }, } diff --git a/apps/twofactor_backupcodes/webpack.js b/apps/twofactor_backupcodes/webpack.js index 88d04e34091..47e5bbe7fa0 100644 --- a/apps/twofactor_backupcodes/webpack.js +++ b/apps/twofactor_backupcodes/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, 'js'), publicPath: '/js', filename: 'settings.js', - jsonpFunction: 'webpackJsonpTwofactorBackupcodes' - } + jsonpFunction: 'webpackJsonpTwofactorBackupcodes', + }, } diff --git a/apps/updatenotification/src/components/UpdateNotification.vue b/apps/updatenotification/src/components/UpdateNotification.vue index 2c5082b171c..c3c04446c1f 100644 --- a/apps/updatenotification/src/components/UpdateNotification.vue +++ b/apps/updatenotification/src/components/UpdateNotification.vue @@ -93,7 +93,7 @@

    {{ t('updatenotification', 'You can always update to a newer version. But you can never downgrade to a more stable version.') }}
    - +

    diff --git a/apps/updatenotification/webpack.js b/apps/updatenotification/webpack.js index b90777108c7..2c38d6f616c 100644 --- a/apps/updatenotification/webpack.js +++ b/apps/updatenotification/webpack.js @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, './js'), publicPath: '/js/', filename: 'updatenotification.js', - jsonpFunction: 'webpackJsonpUpdatenotification' - } + jsonpFunction: 'webpackJsonpUpdatenotification', + }, } diff --git a/apps/weather_status/webpack.js b/apps/weather_status/webpack.js index 500f1d4616c..30c833bca7c 100644 --- a/apps/weather_status/webpack.js +++ b/apps/weather_status/webpack.js @@ -2,25 +2,25 @@ const path = require('path') module.exports = { entry: { - 'weather-status': path.join(__dirname, 'src', 'weather-status') + 'weather-status': path.join(__dirname, 'src', 'weather-status'), }, output: { path: path.resolve(__dirname, './js'), publicPath: '/js/', filename: '[name].js?v=[chunkhash]', - jsonpFunction: 'webpackJsonpWeatherStatus' + jsonpFunction: 'webpackJsonpWeatherStatus', }, optimization: { splitChunks: { automaticNameDelimiter: '-', - } + }, }, module: { - rules: [ - { - test: /\.(png|jpg|gif|svg|woff|woff2|eot|ttf)$/, - loader: 'url-loader', - }, - ], + rules: [ + { + test: /\.(png|jpg|gif|svg|woff|woff2|eot|ttf)$/, + loader: 'url-loader', + }, + ], }, } diff --git a/apps/workflowengine/webpack.js b/apps/workflowengine/webpack.js index bbd5efa9799..c1437a3f89b 100644 --- a/apps/workflowengine/webpack.js +++ b/apps/workflowengine/webpack.js @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require('path') module.exports = { entry: path.join(__dirname, 'src', 'workflowengine.js'), @@ -6,6 +6,6 @@ module.exports = { path: path.resolve(__dirname, './js'), publicPath: '/js/', filename: 'workflowengine.js', - jsonpFunction: 'webpackJsonpWorkflowengine' - } + jsonpFunction: 'webpackJsonpWorkflowengine', + }, } diff --git a/core/src/tests/.eslintrc.js b/core/src/tests/.eslintrc.js new file mode 100644 index 00000000000..451ef6bdfa2 --- /dev/null +++ b/core/src/tests/.eslintrc.js @@ -0,0 +1,9 @@ +module.exports = { + globals: { + jsdom: true, + sinon: true, + }, + rules: { + "node/no-unpublished-import": 'off' + } +} diff --git a/core/src/tests/OC/requesttoken.spec.js b/core/src/tests/OC/requesttoken.spec.js index d19a4b8e9c8..5506a4f72cc 100644 --- a/core/src/tests/OC/requesttoken.spec.js +++ b/core/src/tests/OC/requesttoken.spec.js @@ -1,4 +1,4 @@ -/* +/** * @copyright 2020 Christoph Wurst * * @author 2020 Christoph Wurst @@ -19,10 +19,10 @@ * along with this program. If not, see . */ -import {JSDOM} from 'jsdom' -import {subscribe, unsubscribe} from '@nextcloud/event-bus' +import { JSDOM } from 'jsdom' +import { subscribe, unsubscribe } from '@nextcloud/event-bus' -import {manageToken, setToken} from '../../OC/requesttoken' +import { manageToken, setToken } from '../../OC/requesttoken' describe('request token', () => { @@ -66,7 +66,7 @@ describe('request token', () => { it('fires off an event for @nextcloud/auth', () => { setToken('123') - expect(listener).to.have.been.calledWith({token: '123'}) + expect(listener).to.have.been.calledWith({ token: '123' }) }) }) diff --git a/core/src/tests/setup.js b/core/src/tests/setup.js index bec4e11eaea..2e8ab27775d 100644 --- a/core/src/tests/setup.js +++ b/core/src/tests/setup.js @@ -21,8 +21,8 @@ require('jsdom-global')() const chai = require('chai') -var sinon = require('sinon') -var sinonChai = require('sinon-chai'); +const sinon = require('sinon') +const sinonChai = require('sinon-chai') chai.use(sinonChai) global.expect = chai.expect diff --git a/core/src/views/Login.vue b/core/src/views/Login.vue index c75ae98030b..304bc883557 100644 --- a/core/src/views/Login.vue +++ b/core/src/views/Login.vue @@ -164,8 +164,8 @@ export default { }, hideLoginForm: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { diff --git a/core/webpack.js b/core/webpack.js index cf9c332ead0..3fc3290d470 100644 --- a/core/webpack.js +++ b/core/webpack.js @@ -33,7 +33,7 @@ module.exports = [ }, plugins: [ new webpack.ProvidePlugin({ - '_': 'underscore', + _: 'underscore', $: 'jquery', jQuery: 'jquery', }), diff --git a/core/webpack.test.js b/core/webpack.test.js index f87d8bd9d92..1fe0c2509db 100644 --- a/core/webpack.test.js +++ b/core/webpack.test.js @@ -19,13 +19,13 @@ * along with this program. If not, see . */ -const { merge } = require('webpack-merge'); -const common = require('./webpack.js'); +const { merge } = require('webpack-merge') +const common = require('./webpack.js') // webpack.config.js const nodeExternals = require('webpack-node-externals') module.exports = merge(common[0], { mode: 'development', devtool: 'inline-cheap-module-source-map', - externals: [nodeExternals()] + externals: [nodeExternals()], }) diff --git a/webpack.common.js b/webpack.common.js index de0aeaacfc8..9d800139aff 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -37,7 +37,7 @@ const modules = { weather_status, twofactor_backupscodes, updatenotification, - workflowengine + workflowengine, } const modulesToBuild = () => { @@ -46,7 +46,7 @@ const modulesToBuild = () => { if (!modules[MODULE]) { throw new Error(`No module "${MODULE}" found`) } - return [ modules[MODULE] ] + return [modules[MODULE]] } return Object.values(modules) } diff --git a/webpack.dev.js b/webpack.dev.js index 95b82b823a4..798f34ef4ff 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -1,5 +1,5 @@ -const { merge } = require('webpack-merge'); -const common = require('./webpack.common.js'); +const { merge } = require('webpack-merge') +const common = require('./webpack.common.js') module.exports = common.map( config => merge(config, { diff --git a/webpack.prod.js b/webpack.prod.js index 9a2477e7d70..69964a32b0f 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -1,6 +1,6 @@ const { merge } = require('webpack-merge') const common = require('./webpack.common.js') -const TerserPlugin = require('terser-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin') module.exports = common.map( config => merge(config, {

    - -