Commit d95a7987 authored by JC Brand's avatar JC Brand

Fix linting errors and add `@module` jsdoc directives

parent b016aa0f
......@@ -244,6 +244,7 @@
"error",
"always"
],
"require-atomic-updates": "off",
"require-await": "error",
"require-jsdoc": "off",
"rest-spread-spacing": "error",
......
......@@ -4,10 +4,12 @@
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
// This plugin started as a fork of Lea Verou's Awesomplete
// https://leaverou.github.io/awesomplete/
/**
* @module converse-autocomplete
* @description
* Converse.js plugin which started as a fork of Lea Verou's Awesomplete
* https://leaverou.github.io/awesomplete/
*/
import converse from "@converse/headless/converse-core";
const { _, Backbone } = converse.env,
......
......@@ -4,12 +4,11 @@
// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/* This is a Converse.js plugin which add support for bookmarks specified
* in XEP-0048.
/**
* @module converse-bookmark-views
* @description
* Converse.js plugin which adds views for XEP-0048 bookmarks
*/
import "backbone.nativeview";
import BrowserStorage from "backbone.browserStorage";
import { OrderedListView } from "backbone.overview";
......
......@@ -4,6 +4,9 @@
// Copyright (c) 2012-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-chatboxviews
*/
import "@converse/headless/converse-chatboxes";
import "backbone.nativeview";
import { Overview } from "backbone.overview";
......
......@@ -4,6 +4,9 @@
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-chatview
*/
import "backbone.nativeview";
import "converse-chatboxviews";
import "converse-message-view";
......
......@@ -4,8 +4,9 @@
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/**
* @module converse-controlbox
*/
import "converse-chatview";
import "converse-profile";
import "converse-rosterview";
......
......@@ -4,8 +4,9 @@
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define, window, document */
/**
* @module converse-dragresize
*/
import "converse-chatview";
import "converse-controlbox";
import converse from "@converse/headless/converse-core";
......
......@@ -4,7 +4,9 @@
// Copyright (c) JC Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/**
* @module converse-fullscreen
*/
import "@converse/headless/converse-muc";
import "converse-chatview";
import "converse-controlbox";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-headline
*/
import "converse-chatview";
import converse from "@converse/headless/converse-core";
import tpl_chatbox from "templates/chatbox.html";
......
......@@ -4,8 +4,11 @@
// Copyright (c) 2012-2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
// Views for XEP-0313 Message Archive Management
/**
* @module converse-mam-views
* @description
* Views for XEP-0313 Message Archive Management
*/
import converse from "@converse/headless/converse-core";
import { debounce } from 'lodash'
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-message-view
*/
import URI from "urijs";
import converse from "@converse/headless/converse-core";
import filesize from "filesize";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-minimize
*/
import "converse-chatview";
import BrowserStorage from "backbone.browserStorage";
import { Overview } from "backbone.overview";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-modal
*/
import "backbone.vdomview";
import bootstrap from "bootstrap.native";
import converse from "@converse/headless/converse-core";
......
......@@ -4,8 +4,11 @@
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
//
// XEP-0045 Multi-User Chat Views
/**
* @module converse-muc-views
* @description
* XEP-0045 Multi-User Chat Views
*/
import "converse-modal";
import "backbone.vdomview";
import BrowserStorage from "backbone.browserStorage";
......
......@@ -4,8 +4,9 @@
// Copyright (c) 2013-2019, JC Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/**
* @module converse-notification
*/
import converse from "@converse/headless/converse-core";
const { Strophe, _, sizzle } = converse.env,
......
......@@ -4,8 +4,10 @@
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* global libsignal, ArrayBuffer, parseInt, crypto */
/* global libsignal, ArrayBuffer */
/**
* @module converse-omemo
*/
import BrowserStorage from "backbone.browserStorage";
import converse from "@converse/headless/converse-core";
import tpl_toolbar_omemo from "templates/toolbar_omemo.html";
......
......@@ -4,8 +4,9 @@
// Copyright (c) 2013-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/**
* @module converse-profile
*/
import "@converse/headless/converse-vcard";
import "converse-modal";
import _FormData from "formdata-polyfill";
......
......@@ -3,12 +3,12 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* This is a Converse.js plugin which add support for registering
/**
* @module converse-push
* @description
* Converse.js plugin which add support for registering
* an "App Server" as defined in XEP-0357
*/
import converse from "@converse/headless/converse-core";
const { Strophe, $iq, _ } = converse.env;
......
......@@ -4,12 +4,12 @@
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/* This is a Converse.js plugin which add support for in-band registration
/**
* @module converse-register
* @description
* This is a Converse.js plugin which add support for in-band registration
* as specified in XEP-0077.
*/
import "converse-controlbox";
import converse from "@converse/headless/converse-core";
import tpl_form_input from "templates/form_input.html";
......
......@@ -3,8 +3,10 @@
//
// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
/* This is a non-core Converse.js plugin which shows a list of currently open
/**
* @module converse-roomslist
* @description
* Converse.js plugin which shows a list of currently open
* rooms in the "Rooms Panel" of the ControlBox.
*/
import BrowserStorage from "backbone.browserStorage";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-rosterview
*/
import "@converse/headless/converse-chatboxes";
import "@converse/headless/converse-roster";
import "converse-modal";
......
......@@ -3,13 +3,11 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* converse-singleton
* ******************
*
/**
* @module converse-singleton
* @description
* A plugin which restricts Converse to only one chat.
*/
import converse from "@converse/headless/converse-core";
const { _, Strophe } = converse.env;
......
......@@ -3,10 +3,9 @@
//
// Copyright (c) 2013-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* converse-uniview
* ****************
*
/**
* @module converse-uniview
* @description
* A plugin which ensures that only one chat (private or groupchat) is
* visible at any one time. All other ongoing chats are hidden and kept in the
* background.
......@@ -14,7 +13,6 @@
* This plugin makes sense in mobile, embedded or fullscreen chat environments
* (as configured by the `view_mode` setting).
*/
import "converse-chatview";
import converse from "@converse/headless/converse-core";
......
......@@ -4,12 +4,11 @@
// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/* This is a Converse.js plugin which adds views for bookmarks specified
* in XEP-0048.
/**
* @module converse-bookmarks
* @description
* Converse.js plugin which adds views for bookmarks specified in XEP-0048.
*/
import BrowserStorage from "backbone.browserStorage";
import converse from "@converse/headless/converse-core";
import muc from "@converse/headless/converse-muc";
......
......@@ -3,9 +3,11 @@
//
// Copyright (c) The Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* This is a Converse.js plugin which add support for XEP-0206: XMPP Over BOSH */
/**
* @module converse-bosh
* @description
* Converse.js plugin which add support for XEP-0206: XMPP Over BOSH
*/
import BrowserStorage from "backbone.browserStorage";
import converse from "./converse-core";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-caps
*/
import SHA1 from 'strophe.js/src/sha1';
import converse from "@converse/headless/converse-core";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2012-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-chatboxes
*/
import "./utils/emoji";
import "./utils/form";
import BrowserStorage from "backbone.browserStorage";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-core
*/
import * as bosh from 'strophe.js/src/bosh';
import * as strophe from 'strophe.js/src/core';
import * as websocket from 'strophe.js/src/websocket';
......
......@@ -3,9 +3,11 @@
//
// Copyright (c) 2013-2019, the Converse developers
// Licensed under the Mozilla Public License (MPLv2)
/* This is a Converse plugin which add support for XEP-0030: Service Discovery */
/**
* @module converse-disco
* @description
* Converse plugin which add support for XEP-0030: Service Discovery
*/
import BrowserStorage from "backbone.browserStorage";
import converse from "./converse-core";
import sizzle from "sizzle";
......
......@@ -4,14 +4,16 @@
// Copyright (c) Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
// XEP-0313 Message Archive Management
/**
* @module converse-mam
* @description
* XEP-0313 Message Archive Management
*/
import "./converse-disco";
import "./converse-rsm";
import converse from "./converse-core";
import sizzle from "sizzle";
const { Strophe, $iq, $build, _, dayjs } = converse.env;
const u = converse.env.utils;
......
......@@ -4,8 +4,11 @@
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
//
// XEP-0045 Multi-User Chat
/**
* @module converse-muc
* @description
* Implements the non-view logic for XEP-0045 Multi-User Chat
*/
import "./converse-disco";
import "./utils/emoji";
import "./utils/muc";
......@@ -928,7 +931,7 @@ converse.plugins.add('converse-muc', {
* been received.
*/
autoConfigureChatRoom () {
return new Promise(async (resolve, reject) => {
return new Promise(async (resolve, reject) => { /* eslint-disable-line no-async-promise-executor */
const stanza = await this.fetchRoomConfiguration();
const fields = sizzle('field', stanza);
const configArray = fields.map(f => this.addFieldValue(f))
......
......@@ -3,11 +3,12 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* This is a Converse.js plugin which add support for application-level pings
/**
* @module converse-ping
* @description
* Converse.js plugin which add support for application-level pings
* as specified in XEP-0199 XMPP Ping.
*/
import converse from "./converse-core";
// Strophe methods for building stanzas
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-pubsub
*/
import "./converse-disco";
import converse from "./converse-core";
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-roster
*/
import BrowserStorage from "backbone.browserStorage";
import converse from "@converse/headless/converse-core";
......
......@@ -7,8 +7,11 @@
// Some code taken from the Strophe RSM plugin, licensed under the MIT License
// Copyright 2006-2017 Strophe (https://github.com/strophe/strophejs)
//
// XEP-0059 Result Set Management
/**
* @module converse-rsm
* @description
* XEP-0059 Result Set Management
*/
import converse from "./converse-core";
const { Strophe, $build } = converse.env;
......
......@@ -3,9 +3,12 @@
//
// Copyright (c) The Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/* This is a Converse.js plugin which add support for XEP-0198: Stream Management */
//
/**
* @module converse-smacks
* @description
* Converse.js plugin which adds support for XEP-0198: Stream Management
*/
import converse from "./converse-core";
const { Strophe, $build, _ } = converse.env;
......
......@@ -3,7 +3,9 @@
//
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
/**
* @module converse-vcard
*/
import BrowserStorage from "backbone.browserStorage";
import converse from "./converse-core";
import tpl_vcard from "./templates/vcard.html";
......
......@@ -6,8 +6,6 @@
// Copyright (c) 2013-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
import 'dayjs/locale/af';
import 'dayjs/locale/ar';
import 'dayjs/locale/bg';
......
/*global define */
define(['lodash'], function (_) {
return _.noConflict();
});
......@@ -6,8 +6,6 @@
// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global escape, Uint8Array */
import * as strophe from 'strophe.js/src/core';
import Backbone from "backbone";
import Promise from "es6-promise/dist/es6-promise.auto";
......
......@@ -6,9 +6,7 @@
// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global escape, Jed */
/*global Jed */
import converse from "@converse/headless/converse-core";
import u from "./core";
......
/*global define */
define([], function () {
return Object;
});
/*global define */
define(['lodash'], function (_) {
return _.noConflict();
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment