Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Type-check ESLint configuration.
Anders Kaseorg56fc587dfd74
diff --git a/eslint.config.js b/eslint.config.jsindex 218b7f1f66f..c3b53c14049 100644--- a/eslint.config.js+++ b/eslint.config.js@@ -1,6 +1,9 @@+// @ts-check+import {FlatCompat} from "@eslint/eslintrc";import js from "@eslint/js";import confusingBrowserGlobals from "confusing-browser-globals";+import {defineConfig} from "eslint/config";import prettier from "eslint-config-prettier";import {configs as astroConfigs} from "eslint-plugin-astro";import formatjs from "eslint-plugin-formatjs";@@ -13,7 +16,7 @@ import tseslint from "typescript-eslint";const compat = new FlatCompat({baseDirectory: import.meta.dirname});-export default tseslint.config(+export default defineConfig({// This is intended for generated files and vendored third-party files.// For our source code, instead of adding files here, consider using@@ -29,7 +32,8 @@ export default tseslint.config(},js.configs.recommended,importPlugin.flatConfigs.recommended,- compat.extends("plugin:no-jquery/recommended", "plugin:no-jquery/deprecated"),+ compat.config(noJquery.configs.recommended),+ compat.config(noJquery.configs.deprecated),unicorn.configs.recommended,prettier,tseslint.configs.strictTypeChecked,@@ -318,7 +322,7 @@ export default tseslint.config("unicorn/prefer-string-replace-all": "off",},},- ...astroConfigs.recommended,+ astroConfigs.recommended,{files: ["starlight_help/src/components/ZulipNote.astro"],rules: {diff --git a/package.json b/package.jsonindex 437cd1d27f8..3d503574f8c 100644--- a/package.json+++ b/package.json@@ -105,6 +105,7 @@"@types/blueimp-md5": "^2.18.0","@types/co-body": "^6.1.3","@types/confusing-browser-globals": "^1.0.3",+ "@types/eslint-config-prettier": "^6.11.3","@types/gtag.js": "^0.0.20","@types/is-url": "^1.2.32","@types/jquery": "^3.3.31",@@ -125,6 +126,7 @@"@types/winchan": "^0.2.0","@typescript-eslint/eslint-plugin": "^8.2.0","@typescript-eslint/parser": "^8.2.0",+ "@typescript-eslint/utils": "^8.25.0","astro-eslint-parser": "^1.2.2","babel-plugin-istanbul": "^7.0.0","callsites": "^4.2.0",@@ -170,6 +172,7 @@},"pnpm": {"overrides": {+ "@types/eslint": "-","source-map@^0.6": "npm:source-map-js@^1.2.1"},"patchedDependencies": {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 4f860e78d3b..2c1943b45eb 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -5,6 +5,7 @@ settings:excludeLinksFromLockfile: falseoverrides:+ '@types/eslint': '-'source-map@^0.6: npm:source-map-js@^1.2.1patchedDependencies:@@ -335,6 +336,9 @@ importers:'@types/confusing-browser-globals':specifier: ^1.0.3version: 1.0.3+ '@types/eslint-config-prettier':+ specifier: ^6.11.3+ version: 6.11.3'@types/gtag.js':specifier: ^0.0.20version: 0.0.20@@ -395,6 +399,9 @@ importers:'@typescript-eslint/parser':specifier: ^8.2.0+ '@typescript-eslint/utils':+ specifier: ^8.25.0astro-eslint-parser:specifier: ^1.2.2version: 1.2.2@@ -2705,12 +2712,12 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}+ '@types/[email protected]':+ resolution: {integrity: sha512-3wXCiM8croUnhg9LdtZUJQwNcQYGWxxdOWDjPe1ykCqJFPVpzAKfs/2dgSoCtAvdPeaponcWPI7mPcGGp9dkKQ==}+'@types/[email protected]':resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}- '@types/[email protected]':- resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==}-'@types/[email protected]':resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}@@ -12358,15 +12365,11 @@ snapshots:dependencies:'@types/ms': 2.1.0- '@types/[email protected]':- dependencies:- '@types/eslint': 9.6.1- '@types/estree': 1.0.8+ '@types/[email protected]': {}- '@types/[email protected]':+ '@types/[email protected]':dependencies:'@types/estree': 1.0.8- '@types/json-schema': 7.0.15'@types/[email protected]':dependencies:@@ -14788,7 +14791,6 @@ snapshots:dependencies:'@formatjs/icu-messageformat-parser': 2.11.2'@formatjs/ts-transformer': 3.14.0- '@types/eslint': 9.6.1'@types/picomatch': 3.0.2eslint: 9.34.0([email protected])diff --git a/version.py b/version.pyindex 3d55e538700..772afc2a7ba 100644--- a/version.py+++ b/version.py@@ -49,4 +49,4 @@ API_FEATURE_LEVEL = 425# historical commits sharing the same major version, in which case a# minor version bump suffices.-PROVISION_VERSION = (347, 2) # bumped 2025-09-04 to upgrade Python requirements+PROVISION_VERSION = (347, 3) # bumped 2025-09-09 to add @types/eslint-config-prettierdiff --git a/web/src/types/eslint-plugin-no-jquery.d.ts b/web/src/types/eslint-plugin-no-jquery.d.tsnew file mode 100644index 00000000000..ccab4f9d699--- /dev/null+++ b/web/src/types/eslint-plugin-no-jquery.d.ts@@ -0,0 +1,37 @@+import type {Linter, Rule} from "eslint";++declare const eslintPluginNoJquery: {+ rules: Record<string, Rule.RuleModule>;+ configs: {+ recommended: Linter.LegacyConfig;+ slim: Linter.LegacyConfig;+ deprecated: Linter.LegacyConfig;+ ["deprecated-3.7"]: Linter.LegacyConfig;+ ["deprecated-3.6"]: Linter.LegacyConfig;+ ["deprecated-3.5"]: Linter.LegacyConfig;+ ["deprecated-3.4"]: Linter.LegacyConfig;+ ["deprecated-3.3"]: Linter.LegacyConfig;+ ["deprecated-3.2"]: Linter.LegacyConfig;+ ["deprecated-3.1"]: Linter.LegacyConfig;+ ["deprecated-3.0"]: Linter.LegacyConfig;+ ["deprecated-2.2"]: Linter.LegacyConfig;+ ["deprecated-2.1"]: Linter.LegacyConfig;+ ["deprecated-2.0"]: Linter.LegacyConfig;+ ["deprecated-1.12"]: Linter.LegacyConfig;+ ["deprecated-1.11"]: Linter.LegacyConfig;+ ["deprecated-1.10"]: Linter.LegacyConfig;+ ["deprecated-1.9"]: Linter.LegacyConfig;+ ["deprecated-1.8"]: Linter.LegacyConfig;+ ["deprecated-1.7"]: Linter.LegacyConfig;+ ["deprecated-1.6"]: Linter.LegacyConfig;+ ["deprecated-1.5"]: Linter.LegacyConfig;+ ["deprecated-1.4"]: Linter.LegacyConfig;+ ["deprecated-1.3"]: Linter.LegacyConfig;+ ["deprecated-1.2"]: Linter.LegacyConfig;+ ["deprecated-1.1"]: Linter.LegacyConfig;+ ["deprecated-1.0"]: Linter.LegacyConfig;+ all: Linter.LegacyConfig;+ };+};++export = eslintPluginNoJquery;