Merge pull request #21190 from nextcloud/td/js/linter

Fix some linter warning
This commit is contained in:
Roeland Jago Douma 2020-06-02 16:02:07 +02:00 committed by GitHub
commit 7d33de5599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 101 additions and 159 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

61
core/js/dist/login.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

81
core/js/dist/main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -14,6 +14,7 @@ import DOMPurify from 'dompurify'
import Handlebars from 'handlebars'
import identity from 'lodash/fp/identity'
import escapeHTML from 'escape-html'
import { generateFilePath } from '@nextcloud/router'
import OC from './index'
import {
@ -49,7 +50,7 @@ const L10n = {
}
const self = this
const url = OC.filePath(appName, 'l10n', OC.getLocale() + '.json')
const url = generateFilePath(appName, 'l10n', OC.getLocale() + '.json')
// load JSON translation bundle per AJAX
return $.get(url)

View file

@ -20,6 +20,7 @@
*/
import $ from 'jquery'
import { generateFilePath } from '@nextcloud/router'
const loadedScripts = {}
const loadedStyles = []
@ -37,7 +38,7 @@ export const addScript = (app, script, ready) => {
console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead')
let deferred
const path = OC.filePath(app, 'js', script + '.js')
const path = generateFilePath(app, 'js', script + '.js')
if (!loadedScripts[path]) {
deferred = $.Deferred()
$.getScript(path, () => deferred.resolve())
@ -59,7 +60,7 @@ export const addScript = (app, script, ready) => {
export const addStyle = (app, style) => {
console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead')
const path = OC.filePath(app, 'css', style + '.css')
const path = generateFilePath(app, 'css', style + '.css')
if (loadedStyles.indexOf(path) === -1) {
loadedStyles.push(path)
if (document.createStyleSheet) {

View file

@ -22,6 +22,7 @@
import _ from 'underscore'
import $ from 'jquery'
import moment from 'moment'
import { generateUrl } from '@nextcloud/router'
import OC from './index'
@ -105,7 +106,7 @@ export default {
const self = this
$.ajax({
url: OC.generateUrl('/login/confirm'),
url: generateUrl('/login/confirm'),
data: {
password: password,
},

View file

@ -19,6 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import $ from 'jquery'
/**
* Parses a URL query string into a JS map
* @param {string} queryString query string in the format param1=1234&param2=abcde&param3=xyz