mirror of https://github.com/zulip/zulip.git
eslint: Replace sort-imports with import/order.
import/order sorts require() calls as well as import statements. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
0771e7fc59
commit
e3b3df328d
|
@ -19,7 +19,16 @@
|
|||
"empty-returns/main": "error",
|
||||
"eqeqeq": "error",
|
||||
"guard-for-in": "error",
|
||||
"import/first": "error",
|
||||
"import/newline-after-import": "error",
|
||||
"import/no-unresolved": ["error", {"ignore": ["!"]}],
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"alphabetize": {"order": "asc"},
|
||||
"newlines-between": "always"
|
||||
}
|
||||
],
|
||||
"new-cap": [
|
||||
"error",
|
||||
{
|
||||
|
@ -78,7 +87,6 @@
|
|||
}
|
||||
],
|
||||
"radix": "error",
|
||||
"sort-imports": "error",
|
||||
"spaced-comment": "off",
|
||||
"strict": "off",
|
||||
"valid-typeof": ["error", {"requireStringLiterals": true}],
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
var common = require("../casper_lib/common.js");
|
||||
|
||||
var realm_url = "http://zulip.zulipdev.com:9981/";
|
||||
|
||||
// Start of test script.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
var common = require("../casper_lib/common.js");
|
||||
var test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
||||
var common = require("../casper_lib/common.js");
|
||||
|
||||
var OUTGOING_WEBHOOK_BOT_TYPE = "3";
|
||||
var GENERIC_BOT_TYPE = "1";
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const noop = () => {};
|
||||
const {JSDOM} = require("jsdom");
|
||||
const fs = require("fs");
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
const template = fs.readFileSync("templates/corporate/billing.html", "utf-8");
|
||||
const dom = new JSDOM(template, {pretendToBeVisual: true});
|
||||
const document = dom.window.document;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
const {JSDOM} = require("jsdom");
|
||||
const fs = require("fs");
|
||||
|
||||
const JQuery = require("jquery");
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
const template = fs.readFileSync("templates/corporate/upgrade.html", "utf-8");
|
||||
const dom = new JSDOM(template, {pretendToBeVisual: true});
|
||||
const jquery = require("jquery")(dom.window);
|
||||
const jquery = JQuery(dom.window);
|
||||
|
||||
set_global("$", global.make_zjquery());
|
||||
set_global("page_params", {});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const rewiremock = require("rewiremock/node");
|
||||
const {JSDOM} = require("jsdom");
|
||||
const rewiremock = require("rewiremock/node");
|
||||
|
||||
set_global("bridge", false);
|
||||
|
||||
|
|
|
@ -6,9 +6,11 @@ set_global("page_params", {
|
|||
set_global("compose_ui", {});
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
const {window} = new JSDOM("<!DOCTYPE html><p>Hello world</p>");
|
||||
const {DOMParser, document} = window;
|
||||
set_global("$", require("jquery")(window));
|
||||
|
||||
set_global("DOMParser", DOMParser);
|
||||
set_global("document", document);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const events = require("./lib/events.js");
|
||||
|
||||
const event_fixtures = events.fixtures;
|
||||
const test_user = events.test_user;
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
const fs = require("fs");
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
const template = fs.readFileSync("templates/analytics/realm_details.html", "utf-8");
|
||||
const dom = new JSDOM(template, {pretendToBeVisual: true});
|
||||
const document = dom.window.document;
|
||||
|
|
|
@ -3,6 +3,7 @@ set_global("page_params", {
|
|||
twenty_four_hour_time: true,
|
||||
});
|
||||
set_global("moment", require("moment-timezone"));
|
||||
|
||||
set_global("XDate", zrequire("XDate", "xdate"));
|
||||
zrequire("timerender");
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const noop = () => {};
|
||||
const {JSDOM} = require("jsdom");
|
||||
const fs = require("fs");
|
||||
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
const template = fs.readFileSync("templates/corporate/upgrade.html", "utf-8");
|
||||
const dom = new JSDOM(template, {pretendToBeVisual: true});
|
||||
const document = dom.window.document;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
const path = require("path");
|
||||
const puppeteer = require("puppeteer");
|
||||
const assert = require("assert").strict;
|
||||
const path = require("path");
|
||||
|
||||
const puppeteer = require("puppeteer");
|
||||
|
||||
const test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
||||
|
||||
class CommonUtils {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const common = require("../puppeteer_lib/common");
|
||||
const assert = require("assert").strict;
|
||||
|
||||
const common = require("../puppeteer_lib/common");
|
||||
|
||||
const email = "alice@test.example.com";
|
||||
const subdomain = "testsubdomain";
|
||||
const organization_name = "Awesome Organization";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const common = require("../puppeteer_lib/common");
|
||||
const test_credentials = require("../../var/casper/test_credentials.js").test_credentials;
|
||||
const common = require("../puppeteer_lib/common");
|
||||
|
||||
async function login_tests(page) {
|
||||
await common.log_in(page, test_credentials.default_user);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const _ = require("underscore/underscore.js");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const _ = require("underscore/underscore.js");
|
||||
|
||||
exports.find_files_to_run = function () {
|
||||
let oneFileFilter = [];
|
||||
let testsDifference = [];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const fs = require("fs");
|
||||
const Handlebars = require("handlebars/dist/cjs/handlebars.js");
|
||||
const path = require("path");
|
||||
|
||||
const Handlebars = require("handlebars/dist/cjs/handlebars.js");
|
||||
const {SourceMapConsumer, SourceNode} = require("source-map");
|
||||
|
||||
const templates_path = path.resolve(__dirname, "../../static/templates");
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const Module = require("module");
|
||||
const path = require("path");
|
||||
|
||||
const escapeRegExp = require("lodash/escapeRegExp");
|
||||
|
||||
const finder = require("./finder.js");
|
||||
const handlebars = require("./handlebars.js");
|
||||
const stub_i18n = require("./i18n.js");
|
||||
const namespace = require("./namespace.js");
|
||||
const stub = require("./stub.js");
|
||||
const make_blueslip = require("./zblueslip.js").make_zblueslip;
|
||||
const zjquery = require("./zjquery.js");
|
||||
|
||||
require("@babel/register")({
|
||||
extensions: [".es6", ".es", ".jsx", ".js", ".mjs", ".ts"],
|
||||
only: [
|
||||
|
@ -15,6 +25,7 @@ require("@babel/register")({
|
|||
|
||||
global.assert = require("assert").strict;
|
||||
global._ = require("underscore/underscore.js");
|
||||
|
||||
const _ = global._;
|
||||
|
||||
// Create a helper function to avoid sneaky delays in tests.
|
||||
|
@ -23,14 +34,12 @@ function immediate(f) {
|
|||
}
|
||||
|
||||
// Find the files we need to run.
|
||||
const finder = require("./finder.js");
|
||||
const files = finder.find_files_to_run(); // may write to console
|
||||
if (files.length === 0) {
|
||||
throw "No tests found";
|
||||
}
|
||||
|
||||
// Set up our namespace helpers.
|
||||
const namespace = require("./namespace.js");
|
||||
global.set_global = namespace.set_global;
|
||||
global.patch_builtin = namespace.set_global;
|
||||
global.zrequire = namespace.zrequire;
|
||||
|
@ -43,28 +52,19 @@ global.window = new Proxy(global, {
|
|||
global.to_$ = () => window;
|
||||
|
||||
// Set up stub helpers.
|
||||
const stub = require("./stub.js");
|
||||
global.make_stub = stub.make_stub;
|
||||
global.with_stub = stub.with_stub;
|
||||
|
||||
// Set up fake jQuery
|
||||
global.make_zjquery = require("./zjquery.js").make_zjquery;
|
||||
|
||||
// Set up fake blueslip
|
||||
const make_blueslip = require("./zblueslip.js").make_zblueslip;
|
||||
|
||||
// Set up fake translation
|
||||
const stub_i18n = require("./i18n.js");
|
||||
global.make_zjquery = zjquery.make_zjquery;
|
||||
|
||||
// Set up Handlebars
|
||||
const handlebars = require("./handlebars.js");
|
||||
global.make_handlebars = handlebars.make_handlebars;
|
||||
global.stub_templates = handlebars.stub_templates;
|
||||
|
||||
const noop = function () {};
|
||||
|
||||
// Set up fake module.hot
|
||||
const Module = require("module");
|
||||
Module.prototype.hot = {
|
||||
accept: noop,
|
||||
};
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const assert = require("assert").strict;
|
||||
|
||||
// Stubs don't do any magical modifications to your namespace. They
|
||||
// just provide you a function that records what arguments get passed
|
||||
// to it. To use stubs as something more like "spies," use something
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const settings_config = require("./settings_config");
|
||||
const settings_data = require("./settings_data");
|
||||
const render_admin_tab = require("../templates/admin_tab.hbs");
|
||||
const render_settings_organization_settings_tip = require("../templates/settings/organization_settings_tip.hbs");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
const settings_data = require("./settings_data");
|
||||
|
||||
const admin_settings_label = {
|
||||
// Organization settings
|
||||
realm_allow_community_topic_editing: i18n.t("Users can edit the topic of any message"),
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import $ from "jquery";
|
||||
import ErrorStackParser from "error-stack-parser";
|
||||
import $ from "jquery";
|
||||
import StackFrame from "stackframe";
|
||||
import StackTraceGPS from "stacktrace-gps";
|
||||
|
||||
import render_blueslip_stacktrace from "../templates/blueslip_stacktrace.hbs";
|
||||
|
||||
type FunctionName = {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
const util = require("./util");
|
||||
const settings_panel_menu = require("./settings_panel_menu");
|
||||
// You won't find every click handler here, but it's a good place to start!
|
||||
|
||||
const render_buddy_list_tooltip = require("../templates/buddy_list_tooltip.hbs");
|
||||
const render_buddy_list_tooltip_content = require("../templates/buddy_list_tooltip_content.hbs");
|
||||
|
||||
const settings_panel_menu = require("./settings_panel_menu");
|
||||
const util = require("./util");
|
||||
|
||||
function convert_enter_to_click(e) {
|
||||
const key = e.which;
|
||||
if (key === 13) {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
const rendered_markdown = require("./rendered_markdown");
|
||||
const util = require("./util");
|
||||
const render_compose_all_everyone = require("../templates/compose_all_everyone.hbs");
|
||||
const render_compose_announce = require("../templates/compose_announce.hbs");
|
||||
const render_compose_invite_users = require("../templates/compose_invite_users.hbs");
|
||||
const render_compose_not_subscribed = require("../templates/compose_not_subscribed.hbs");
|
||||
const render_compose_private_stream_alert = require("../templates/compose_private_stream_alert.hbs");
|
||||
|
||||
const rendered_markdown = require("./rendered_markdown");
|
||||
const util = require("./util");
|
||||
|
||||
// Docs: https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html
|
||||
|
||||
/* Track the state of the @all warning. The user must acknowledge that they are spamming the entire
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
let focused_recipient;
|
||||
let normal_display = false;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
exports.initialize_pill = function () {
|
||||
const container = $("#private_message_recipient").parent();
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
const autosize = require("autosize");
|
||||
const confirmDatePlugin = require("flatpickr/dist/plugins/confirmDate/confirmDate.js");
|
||||
|
||||
const pygments_data = require("../generated/pygments_data.json");
|
||||
const typeahead = require("../shared/js/typeahead");
|
||||
const autosize = require("autosize");
|
||||
|
||||
const settings_data = require("./settings_data");
|
||||
const confirmDatePlugin = require("flatpickr/dist/plugins/confirmDate/confirmDate.js");
|
||||
|
||||
//************************************
|
||||
// AN IMPORTANT NOTE ABOUT TYPEAHEADS
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const util = require("./util");
|
||||
const render_draft_table_body = require("../templates/draft_table_body.hbs");
|
||||
|
||||
const util = require("./util");
|
||||
|
||||
function set_count(count) {
|
||||
const draft_count = count.toString();
|
||||
const text = i18n.t("Drafts (__draft_count__)", {draft_count});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const util = require("./util");
|
||||
const emoji_codes = require("../generated/emoji/emoji_codes.json");
|
||||
|
||||
const util = require("./util");
|
||||
|
||||
// `emojis_by_name` is the central data source that is supposed to be
|
||||
// used by every widget in the webapp for gathering data for displaying
|
||||
// emojis. Emoji picker uses this data to derive data for its own use.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
const emoji_codes = require("../generated/emoji/emoji_codes.json");
|
||||
const typeahead = require("../shared/js/typeahead");
|
||||
|
||||
const render_emoji_popover = require("../templates/emoji_popover.hbs");
|
||||
const render_emoji_popover_content = require("../templates/emoji_popover_content.hbs");
|
||||
const render_emoji_popover_search_results = require("../templates/emoji_popover_search_results.hbs");
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import google_blob_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-blob-sprite.css";
|
||||
import google_blob_sheet from "emoji-datasource-google-blob/img/google/sheets-256/64.png";
|
||||
import google_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-sprite.css";
|
||||
import google_sheet from "emoji-datasource-google/img/google/sheets-256/64.png";
|
||||
import twitter_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/twitter-sprite.css";
|
||||
import twitter_sheet from "emoji-datasource-twitter/img/twitter/sheets-256/64.png";
|
||||
|
||||
import google_blob_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-blob-sprite.css";
|
||||
import google_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-sprite.css";
|
||||
import twitter_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/twitter-sprite.css";
|
||||
|
||||
const emojisets = new Map([
|
||||
["google", {css: google_css, sheet: google_sheet}],
|
||||
["google-blob", {css: google_blob_css, sheet: google_blob_sheet}],
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
function zephyr_stream_name_match(message, operand) {
|
||||
// Zephyr users expect narrowing to "social" to also show messages to /^(un)*social(.d)*$/
|
||||
// (unsocial, ununsocial, social.d, etc)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
const autosize = require("autosize");
|
||||
|
||||
const render_invitation_failed_error = require("../templates/invitation_failed_error.hbs");
|
||||
const render_invite_subscription = require("../templates/invite_subscription.hbs");
|
||||
const render_settings_dev_env_email_access = require("../templates/settings/dev_env_email_access.hbs");
|
||||
|
||||
const autosize = require("autosize");
|
||||
|
||||
function reset_error_messages() {
|
||||
$("#invite_status").hide().text("").removeClass(common.status_classes);
|
||||
$("#multiuse_invite_status").hide().text("").removeClass(common.status_classes);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const util = require("./util");
|
||||
const huddle_data = require("./huddle_data");
|
||||
const util = require("./util");
|
||||
|
||||
function maybe_add_narrowed_messages(messages, msg_list) {
|
||||
const ids = [];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
function MessageListData(opts) {
|
||||
this.muting_enabled = opts.muting_enabled;
|
||||
if (this.muting_enabled) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
const util = require("./util");
|
||||
const rendered_markdown = require("./rendered_markdown");
|
||||
const render_bookend = require("../templates/bookend.hbs");
|
||||
const render_message_group = require("../templates/message_group.hbs");
|
||||
const render_recipient_row = require("../templates/recipient_row.hbs");
|
||||
const render_single_message = require("../templates/single_message.hbs");
|
||||
|
||||
const rendered_markdown = require("./rendered_markdown");
|
||||
const util = require("./util");
|
||||
|
||||
function MessageListView(list, table_name, collapse_messages) {
|
||||
this.list = list;
|
||||
this.collapse_messages = collapse_messages;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
const stored_messages = new Map();
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
let jwindow;
|
||||
const dimensions = {};
|
||||
let in_stoppable_autoscroll = false;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
let unnarrow_times;
|
||||
|
||||
const LARGER_THAN_MAX_MESSAGE_ID = 10000000000000000;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const render_compose_notification = require("../templates/compose_notification.hbs");
|
||||
const render_notification = require("../templates/notification.hbs");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
|
||||
const notice_memory = new Map();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
const resize_app = function () {
|
||||
const panels_height = $("#panels").height();
|
||||
$("body > .app").height("calc(100% - " + panels_height + "px)");
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const util = require("./util");
|
||||
require("unorm"); // String.prototype.normalize polyfill for IE11
|
||||
const FoldDict = require("./fold_dict").FoldDict;
|
||||
const typeahead = require("../shared/js/typeahead");
|
||||
|
||||
const FoldDict = require("./fold_dict").FoldDict;
|
||||
const settings_data = require("./settings_data");
|
||||
const util = require("./util");
|
||||
|
||||
let people_dict;
|
||||
let people_by_name_dict;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
const util = require("./util");
|
||||
const settings_data = require("./settings_data");
|
||||
const confirmDatePlugin = require("flatpickr/dist/plugins/confirmDate/confirmDate.js");
|
||||
|
||||
const render_actions_popover_content = require("../templates/actions_popover_content.hbs");
|
||||
const render_mobile_message_buttons_popover = require("../templates/mobile_message_buttons_popover.hbs");
|
||||
const render_mobile_message_buttons_popover_content = require("../templates/mobile_message_buttons_popover_content.hbs");
|
||||
|
@ -12,6 +11,9 @@ const render_user_info_popover_content = require("../templates/user_info_popover
|
|||
const render_user_info_popover_title = require("../templates/user_info_popover_title.hbs");
|
||||
const render_user_profile_modal = require("../templates/user_profile_modal.hbs");
|
||||
|
||||
const settings_data = require("./settings_data");
|
||||
const util = require("./util");
|
||||
|
||||
let current_actions_popover_elem;
|
||||
let current_flatpickr_instance;
|
||||
let current_message_info_popover_elem;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
const ClipboardJS = require("clipboard");
|
||||
|
||||
new ClipboardJS("#copy");
|
||||
document.querySelector("#copy").focus();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as google_analytics from "./google-analytics.js";
|
||||
import SimpleBar from "simplebar";
|
||||
|
||||
import * as google_analytics from "./google-analytics.js";
|
||||
import {activate_correct_tab} from "./tabbed-instructions.js";
|
||||
|
||||
function registerCodeSection($codeSection) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import * as google_analytics from "./google-analytics.js";
|
||||
import blueslip from "./../blueslip";
|
||||
|
||||
import * as google_analytics from "./google-analytics.js";
|
||||
import {path_parts} from "./landing-page";
|
||||
|
||||
// these constants are populated immediately with data from the DOM on page load
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const render_recent_topics_body = require("../templates/recent_topics_table.hbs");
|
||||
const render_recent_topic_row = require("../templates/recent_topic_row.hbs");
|
||||
const render_recent_topics_filters = require("../templates/recent_topics_filters.hbs");
|
||||
const render_recent_topics_body = require("../templates/recent_topics_table.hbs");
|
||||
|
||||
const topics = new Map(); // Key is stream-id:topic.
|
||||
let topics_widget;
|
||||
// Sets the number of avatars to display.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
const deferred_message_types = {
|
||||
scheduled: {
|
||||
delivery_type: "send_later",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const util = require("./util");
|
||||
const autosize = require("autosize");
|
||||
|
||||
const util = require("./util");
|
||||
|
||||
let narrow_window = false;
|
||||
|
||||
function confine_to_range(lo, val, hi) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const settings_data = require("./settings_data");
|
||||
const huddle_data = require("./huddle_data");
|
||||
const settings_data = require("./settings_data");
|
||||
|
||||
exports.max_num_of_search_results = 12;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const settings_config = require("./settings_config");
|
||||
const render_settings_tab = require("../templates/settings_tab.hbs");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
|
||||
$("body").ready(() => {
|
||||
$("#settings_overlay_container").on("click", (e) => {
|
||||
if (!overlays.is_modal_open()) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const render_settings_api_key_modal = require("../templates/settings/api_key_modal.hbs");
|
||||
const render_settings_custom_user_profile_field = require("../templates/settings/custom_user_profile_field.hbs");
|
||||
const render_settings_dev_env_email_access = require("../templates/settings/dev_env_email_access.hbs");
|
||||
const render_settings_api_key_modal = require("../templates/settings/api_key_modal.hbs");
|
||||
|
||||
exports.update_email = function (new_email) {
|
||||
const email_input = $("#email_value");
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const util = require("./util");
|
||||
const settings_config = require("./settings_config");
|
||||
const render_admin_invites_list = require("../templates/admin_invites_list.hbs");
|
||||
const render_settings_revoke_invite_modal = require("../templates/settings/revoke_invite_modal.hbs");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
const util = require("./util");
|
||||
|
||||
const meta = {
|
||||
loaded: false,
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const render_stream_specific_notification_row = require("../templates/settings/stream_specific_notification_row.hbs");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
|
||||
exports.get_notifications_table_row_data = function (notify_settings) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const settings_config = require("./settings_config");
|
||||
const pygments_data = require("../generated/pygments_data.json");
|
||||
const render_settings_admin_auth_methods_list = require("../templates/settings/admin_auth_methods_list.hbs");
|
||||
const render_settings_admin_realm_domains_list = require("../templates/settings/admin_realm_domains_list.hbs");
|
||||
const pygments_data = require("../generated/pygments_data.json");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
|
||||
const meta = {
|
||||
loaded: false,
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const settings_data = require("./settings_data");
|
||||
const settings_config = require("./settings_config");
|
||||
const render_admin_user_list = require("../templates/admin_user_list.hbs");
|
||||
const render_admin_human_form = require("../templates/admin_human_form.hbs");
|
||||
const render_admin_bot_form = require("../templates/admin_bot_form.hbs");
|
||||
const render_admin_human_form = require("../templates/admin_human_form.hbs");
|
||||
const render_admin_user_list = require("../templates/admin_user_list.hbs");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
const settings_data = require("./settings_data");
|
||||
|
||||
const section = {
|
||||
active: {},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const util = require("./util");
|
||||
const FoldDict = require("./fold_dict").FoldDict;
|
||||
const LazySet = require("./lazy_set").LazySet;
|
||||
const settings_config = require("./settings_config");
|
||||
const util = require("./util");
|
||||
|
||||
const BinaryDict = function (pred) {
|
||||
/*
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
const util = require("./util");
|
||||
const render_settings_deactivation_stream_modal = require("../templates/settings/deactivation_stream_modal.hbs");
|
||||
const render_stream_member_list_entry = require("../templates/stream_member_list_entry.hbs");
|
||||
const render_subscription_settings = require("../templates/subscription_settings.hbs");
|
||||
const render_subscription_stream_privacy_modal = require("../templates/subscription_stream_privacy_modal.hbs");
|
||||
const settings_data = require("./settings_data");
|
||||
|
||||
const settings_config = require("./settings_config");
|
||||
const settings_data = require("./settings_data");
|
||||
const util = require("./util");
|
||||
|
||||
function setup_subscriptions_stream_hash(sub) {
|
||||
const hash = hash_util.stream_edit_uri(sub);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
const render_all_messages_sidebar_actions = require("../templates/all_messages_sidebar_actions.hbs");
|
||||
const render_delete_topic_modal = require("../templates/delete_topic_modal.hbs");
|
||||
const render_move_topic_to_stream = require("../templates/move_topic_to_stream.hbs");
|
||||
const render_starred_messages_sidebar_actions = require("../templates/starred_messages_sidebar_actions.hbs");
|
||||
const render_stream_sidebar_actions = require("../templates/stream_sidebar_actions.hbs");
|
||||
const render_topic_sidebar_actions = require("../templates/topic_sidebar_actions.hbs");
|
||||
const render_unstar_messages_modal = require("../templates/unstar_messages_modal.hbs");
|
||||
const render_move_topic_to_stream = require("../templates/move_topic_to_stream.hbs");
|
||||
|
||||
// We handle stream popovers and topic popovers in this
|
||||
// module. Both are popped up from the left sidebar.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const util = require("./util");
|
||||
|
||||
let previous_pinned;
|
||||
let previous_normal;
|
||||
let previous_dormant;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
const util = require("./util");
|
||||
const render_subscription = require("../templates/subscription.hbs");
|
||||
const render_subscription_settings = require("../templates/subscription_settings.hbs");
|
||||
const render_subscription_table_body = require("../templates/subscription_table_body.hbs");
|
||||
const render_subscriptions = require("../templates/subscriptions.hbs");
|
||||
|
||||
const util = require("./util");
|
||||
|
||||
exports.show_subs_pane = {
|
||||
nothing_selected() {
|
||||
$(".nothing-selected, #stream_settings_title").show();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const render_tab_bar = require("../templates/tab_bar.hbs");
|
||||
|
||||
const rendered_markdown = require("./rendered_markdown");
|
||||
|
||||
function get_sub_count(current_stream) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const render_more_topics = require("../templates/more_topics.hbs");
|
||||
const render_more_topics_spinner = require("../templates/more_topics_spinner.hbs");
|
||||
const render_topic_list_item = require("../templates/topic_list_item.hbs");
|
||||
|
||||
const topic_list_data = require("./topic_list_data");
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const util = require("./util");
|
||||
const pygments_data = require("../generated/pygments_data.json");
|
||||
const typeahead = require("../shared/js/typeahead");
|
||||
const render_typeahead_list_item = require("../templates/typeahead_list_item.hbs");
|
||||
|
||||
const settings_data = require("./settings_data");
|
||||
const util = require("./util");
|
||||
|
||||
// Returns an array of private message recipients, removing empty elements.
|
||||
// For example, "a,,b, " => ["a", "b"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const util = require("./util");
|
||||
const FoldDict = require("./fold_dict").FoldDict;
|
||||
const util = require("./util");
|
||||
|
||||
// The unread module tracks the message IDs and locations of the
|
||||
// user's unread messages. The tracking is initialized with
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const Uppy = require("@uppy/core");
|
||||
const XHRUpload = require("@uppy/xhr-upload");
|
||||
const ProgressBar = require("@uppy/progress-bar");
|
||||
const XHRUpload = require("@uppy/xhr-upload");
|
||||
|
||||
exports.make_upload_absolute = function (uri) {
|
||||
if (uri.startsWith(compose.uploads_path)) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// dependencies that existed when this code was in people.js.
|
||||
// (We should do bot updates here too.)
|
||||
const settings_config = require("./settings_config");
|
||||
|
||||
exports.update_person = function update(person) {
|
||||
const person_obj = people.get_by_user_id(person.user_id);
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
const jsyaml = require("js-yaml");
|
||||
const SwaggerParser = require("swagger-parser");
|
||||
const ExampleValidator = require("openapi-examples-validator");
|
||||
const SwaggerParser = require("swagger-parser");
|
||||
|
||||
(async () => {
|
||||
// Iterate through the changed files, passed in the arguments.
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
// debugging. It also exposes the list of modules it knows about as the keys
|
||||
// of the require.ids object.
|
||||
|
||||
import webpack, {Template} from "webpack";
|
||||
import path from "path";
|
||||
|
||||
import webpack, {Template} from "webpack";
|
||||
|
||||
export default class DebugRequirePlugin {
|
||||
apply(compiler: webpack.Compiler): void {
|
||||
const resolved = new Map();
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
const puppeteer = require("puppeteer");
|
||||
const commander = require("commander");
|
||||
const path = require("path");
|
||||
|
||||
const commander = require("commander");
|
||||
const mkdirp = require("mkdirp");
|
||||
const puppeteer = require("puppeteer");
|
||||
|
||||
const host = "localhost:9991";
|
||||
const options = {};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import {RuleSetRule, RuleSetUseItem} from "webpack";
|
||||
import {basename, resolve} from "path";
|
||||
|
||||
import {RuleSetRule, RuleSetUseItem} from "webpack";
|
||||
|
||||
export const cacheLoader: RuleSetUseItem = {
|
||||
loader: "cache-loader",
|
||||
options: {
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
import {basename, resolve} from "path";
|
||||
import {cacheLoader, getExposeLoaders} from "./webpack-helpers";
|
||||
import BundleTracker from "webpack4-bundle-tracker";
|
||||
|
||||
import CleanCss from "clean-css";
|
||||
import DebugRequirePlugin from "./debug-require-webpack-plugin";
|
||||
import HtmlWebpackPlugin from "html-webpack-plugin";
|
||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||
import OptimizeCssAssetsPlugin from "optimize-css-assets-webpack-plugin";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
// The devServer member of webpack.Configuration is managed by the
|
||||
// webpack-dev-server package. We are only importing the type here.
|
||||
import _webpackDevServer from "webpack-dev-server";
|
||||
import assets from "./webpack.assets.json";
|
||||
import webpack from "webpack";
|
||||
import _webpackDevServer from "webpack-dev-server";
|
||||
import BundleTracker from "webpack4-bundle-tracker";
|
||||
|
||||
import DebugRequirePlugin from "./debug-require-webpack-plugin";
|
||||
import {cacheLoader, getExposeLoaders} from "./webpack-helpers";
|
||||
import assets from "./webpack.assets.json";
|
||||
|
||||
export default (env?: string): webpack.Configuration[] => {
|
||||
const production: boolean = env === "production";
|
||||
|
|
Loading…
Reference in New Issue