Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

eslint: Enable no-jquery/no-append-html.

Anders Kaseorgb9e55f2c4d28
diff --git a/.eslintrc.json b/.eslintrc.json
index c4e3bf500e7..5bec542a311 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -73,6 +73,7 @@
"no-implied-eval": "error",
"no-inner-declarations": "off",
"no-iterator": "error",
+ "no-jquery/no-append-html": "error",
"no-jquery/no-constructor-attributes": "error",
"no-jquery/no-parse-html-literal": "error",
"no-label-var": "error",
diff --git a/package.json b/package.json
index 061330e906d..8916f27d7ba 100644
--- a/package.json
+++ b/package.json
@@ -159,7 +159,8 @@
"source-map@^0.6": "npm:[email protected]"
},
"patchedDependencies": {
}
},
"nyc": {
diff --git a/patches/[email protected] b/patches/[email protected]
new file mode 100644
index 00000000000..47c241297f3
--- /dev/null
+++ b/patches/[email protected]
@@ -0,0 +1,13 @@
+diff --git a/src/rules/no-append-html.js b/src/rules/no-append-html.js
+index 4dd1499f140d307433664b4aadec589473cd41fa..bcca359faf7d5a196bc58ad2fbda39992b012ec2 100644
+--- a/src/rules/no-append-html.js
++++ b/src/rules/no-append-html.js
+@@ -1,7 +1,7 @@
+ 'use strict';
+
+ const utils = require( '../utils.js' );
+-const methods = [ 'append', 'prepend', 'before', 'after', 'replaceWith' ];
++const methods = [ 'append', 'prepend', 'before', 'after', 'replaceWith', 'add', 'appendTo', 'prependTo' ];
+
+ function alljQueryOrEmpty( context, node ) {
+ if ( node.type === 'ConditionalExpression' ) {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dd916def4d4..823422f43c9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,6 +8,9 @@ overrides:
source-map@^0.6: npm:[email protected]
patchedDependencies:
+ hash: 3o6vd4atcpz6wln5ovpbrt3cea
+ path: patches/[email protected]
hash: 4n7ij66tzyhzaqnxsenbilrxr4
path: patches/[email protected]
@@ -392,7 +395,7 @@ devDependencies:
version: 2.29.1(@typescript-eslint/[email protected])([email protected])([email protected])
eslint-plugin-no-jquery:
specifier: ^2.7.0
- version: 2.7.0([email protected])
+ version: 2.7.0(patch_hash=3o6vd4atcpz6wln5ovpbrt3cea)([email protected])
eslint-plugin-unicorn:
specifier: ^51.0.1
version: 51.0.1([email protected])
@@ -6234,13 +6237,14 @@ packages:
- supports-color
dev: true
+ /[email protected](patch_hash=3o6vd4atcpz6wln5ovpbrt3cea)([email protected]):
resolution: {integrity: sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==}
peerDependencies:
eslint: '>=2.3.0'
dependencies:
eslint: 8.57.0
dev: true
+ patched: true
resolution: {integrity: sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==}
diff --git a/version.py b/version.py
index 4c092e71377..ac54b9b59d1 100644
--- a/version.py
+++ b/version.py
@@ -48,4 +48,4 @@ API_FEATURE_LEVEL = 246
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
-PROVISION_VERSION = (267, 0)
+PROVISION_VERSION = (267, 1)
diff --git a/web/src/stream_list.ts b/web/src/stream_list.ts
index 7aef7639657..e7b253c588b 100644
--- a/web/src/stream_list.ts
+++ b/web/src/stream_list.ts
@@ -329,7 +329,7 @@ export function build_stream_list(force_rerender: boolean): void {
add_sidebar_li(stream_id);
}
- $parent.append(elems);
+ $parent.append(elems); // eslint-disable-line no-jquery/no-append-html
}
export function get_stream_li(stream_id: number): JQuery | undefined {