From 90e9a75b070ad04ef7ef95c91f0543d9562247e6 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Thu, 26 Nov 2020 11:22:49 +0100 Subject: [PATCH] Add eslint config --- onlyoffice/.eslintrc.json | 17 +++++++++++++++++ onlyoffice/ui/src/app.js | 9 ++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 onlyoffice/.eslintrc.json diff --git a/onlyoffice/.eslintrc.json b/onlyoffice/.eslintrc.json new file mode 100644 index 0000000000..5e35a3432c --- /dev/null +++ b/onlyoffice/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "env": { + "browser": true, + "es6": true, + "amd": true + }, + "extends": [ + "standard", + "plugin:vue/essential" + ], + "parserOptions": { + "sourceType": "module" + }, + "rules": { + + } +} diff --git a/onlyoffice/ui/src/app.js b/onlyoffice/ui/src/app.js index 50e965b1b4..366360f795 100644 --- a/onlyoffice/ui/src/app.js +++ b/onlyoffice/ui/src/app.js @@ -5,14 +5,14 @@ const appInfo = { extensions: [ { extension: 'docx', - handler: function({ extensionConfig, filePath, fileId }) { + handler: function ({ extensionConfig, filePath, fileId }) { window.open( `${extensionConfig.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`, '_blank' ) }, newFileMenu: { - menuTitle($gettext) { + menuTitle ($gettext) { return $gettext('New OnlyOffice document') }, icon: 'x-office-document' @@ -20,7 +20,7 @@ const appInfo = { }, { extension: 'xlsx', - handler: function({ extensionConfig, filePath, fileId }) { + handler: function ({ extensionConfig, filePath, fileId }) { window.open( `${extensionConfig.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`, '_blank' @@ -29,7 +29,7 @@ const appInfo = { }, { extension: 'pptx', - handler: function({ extensionConfig, filePath, fileId }) { + handler: function ({ extensionConfig, filePath, fileId }) { window.open( `${extensionConfig.server}/apps/onlyoffice/${fileId}?filePath=${encodeURIComponent(filePath)}`, '_blank' @@ -42,4 +42,3 @@ const appInfo = { export default { appInfo } -