mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	eslint: Forbid CommonJS variables in ES6 modules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							830c4acedc
						
					
				
				
					commit
					9553f11387
				
			@@ -209,7 +209,6 @@
 | 
			
		||||
            "files": ["static/**"],
 | 
			
		||||
            "env": {
 | 
			
		||||
                "browser": true,
 | 
			
		||||
                "commonjs": true,
 | 
			
		||||
                "node": false
 | 
			
		||||
            },
 | 
			
		||||
            "rules": {
 | 
			
		||||
@@ -223,7 +222,6 @@
 | 
			
		||||
            "files": ["static/shared/**"],
 | 
			
		||||
            "env": {
 | 
			
		||||
                "browser": false,
 | 
			
		||||
                "commonjs": false,
 | 
			
		||||
                "shared-node-browser": true
 | 
			
		||||
            },
 | 
			
		||||
            "rules": {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
const Module = require("module");
 | 
			
		||||
const path = require("path");
 | 
			
		||||
 | 
			
		||||
require("css.escape");
 | 
			
		||||
@@ -52,11 +51,6 @@ handlebars.hook_require();
 | 
			
		||||
 | 
			
		||||
const noop = function () {};
 | 
			
		||||
 | 
			
		||||
// Set up fake module.hot
 | 
			
		||||
Module.prototype.hot = {
 | 
			
		||||
    accept: noop,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function short_tb(tb) {
 | 
			
		||||
    const lines = tb.split("\n");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
/* eslint-env commonjs */
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,12 @@
 | 
			
		||||
import $ from "jquery";
 | 
			
		||||
 | 
			
		||||
import render_confirm_delete_user_avatar from "../templates/confirm_delete_user_avatar.hbs";
 | 
			
		||||
 | 
			
		||||
import * as channel from "./channel";
 | 
			
		||||
import * as confirm_dialog from "./confirm_dialog";
 | 
			
		||||
import * as settings_data from "./settings_data";
 | 
			
		||||
import * as upload_widget from "./upload_widget";
 | 
			
		||||
 | 
			
		||||
const render_confirm_delete_user_avatar = require("../templates/confirm_delete_user_avatar.hbs");
 | 
			
		||||
 | 
			
		||||
export function build_bot_create_widget() {
 | 
			
		||||
    // We have to do strange gyrations with the file input to clear it,
 | 
			
		||||
    // where we replace it wholesale, so we generalize the file input with
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,5 @@
 | 
			
		||||
import $ from "jquery";
 | 
			
		||||
 | 
			
		||||
// This reloads the module in development rather than refreshing the page
 | 
			
		||||
if (module.hot) {
 | 
			
		||||
    module.hot.accept();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const status_classes = "alert-error alert-success alert-info alert-warning";
 | 
			
		||||
 | 
			
		||||
// TODO: Move this to the portico codebase.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
/* eslint-env commonjs */
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
const $ = require("jquery");
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
/* eslint-env commonjs */
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
// Media query breakpoints according to Bootstrap 4.5
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
/* eslint-env commonjs */
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
const $ = require("jquery");
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
/* eslint-env commonjs */
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
const {Filter} = require("./filter");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user