Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Switch from eslint-plugin-import to eslint-plugin-import-x.
Anders Kaseorg52e582c0ac8f
diff --git a/eslint.config.js b/eslint.config.jsindex f0cecc237e2..909bf656141 100644--- a/eslint.config.js+++ b/eslint.config.js@@ -7,7 +7,7 @@ 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";-import importPlugin from "eslint-plugin-import";+import * as importX from "eslint-plugin-import-x";import * as mdx from "eslint-plugin-mdx";import noJquery from "eslint-plugin-no-jquery";import promise from "eslint-plugin-promise";@@ -32,7 +32,7 @@ export default defineConfig(],},js.configs.recommended,- importPlugin.flatConfigs.recommended,+ importX.flatConfigs.recommended,compat.config(noJquery.configs.recommended),compat.config(noJquery.configs.deprecated),unicorn.configs.recommended,@@ -43,7 +43,7 @@ export default defineConfig(mdx.flat,{files: ["**/*.cts", "**/*.mts", "**/*.ts"],- extends: [importPlugin.flatConfigs.typescript],+ extends: [importX.flatConfigs.typescript],},{plugins: {@@ -68,11 +68,6 @@ export default defineConfig(formatjs: {additionalFunctionNames: ["$t", "$t_html"],},- "import/resolver": {- node: {- extensions: [".ts", ".d.ts", ".js"],- },- },"no-jquery": {collectionReturningPlugins: {expectOne: "always"},variablePattern: "^\\$(?!t$|t_html$).",@@ -118,16 +113,19 @@ export default defineConfig(],"formatjs/no-id": "error","guard-for-in": "error",- "import/extensions": ["error", "ignorePackages"],- "import/first": "error",- "import/newline-after-import": "error",- "import/no-cycle": ["error", {ignoreExternal: true}],- "import/no-duplicates": "error",- "import/no-self-import": "error",- "import/no-unresolved": "off",- "import/no-useless-path-segments": "error",- "import/order": ["error", {alphabetize: {order: "asc"}, "newlines-between": "always"}],- "import/unambiguous": "error",+ "import-x/extensions": ["error", "ignorePackages"],+ "import-x/first": "error",+ "import-x/newline-after-import": "error",+ "import-x/no-cycle": ["error", {ignoreExternal: true}],+ "import-x/no-duplicates": "error",+ "import-x/no-self-import": "error",+ "import-x/no-unresolved": "off",+ "import-x/no-useless-path-segments": "error",+ "import-x/order": [+ "error",+ {alphabetize: {order: "asc"}, "newlines-between": "always"},+ ],+ "import-x/unambiguous": "error","lines-around-directive": "error","new-cap": "error","no-alert": "error",@@ -213,15 +211,15 @@ export default defineConfig(rules: {"@typescript-eslint/no-unused-vars": "off","comma-spacing": "error",- "import/extensions": "off",- "import/unambiguous": "off",+ "import-x/extensions": "off",+ "import-x/unambiguous": "off",quotes: "error",},},{files: ["**/*.md"],rules: {- "import/unambiguous": "off",+ "import-x/unambiguous": "off",},},{@@ -244,7 +242,7 @@ export default defineConfig({files: ["**/*.d.ts"],rules: {- "import/unambiguous": "off",+ "import-x/unambiguous": "off",},},{@@ -279,7 +277,7 @@ export default defineConfig({files: ["web/src/**"],settings: {- "import/resolver": {+ "import-x/resolver": {webpack: {config: {},},@@ -316,7 +314,7 @@ export default defineConfig({files: ["starlight_help/src/components/ZulipNote.astro"],rules: {- "import/unambiguous": "off",+ "import-x/unambiguous": "off",},},{@@ -325,7 +323,7 @@ export default defineConfig(// We need to turn off this rule since we want import statements// to be easily copy-paste-able between content/include and// content/docs.- "import/no-useless-path-segments": "off",+ "import-x/no-useless-path-segments": "off",},},);diff --git a/package.json b/package.jsonindex e5bac409c40..60d5124cc84 100644--- a/package.json+++ b/package.json@@ -145,10 +145,11 @@"es-check": "^9.1.2","eslint": "^9.15.0","eslint-config-prettier": "^10.0.1",+ "eslint-import-resolver-typescript": "^4.4.5","eslint-import-resolver-webpack": "^0.13.4","eslint-plugin-astro": "^1.3.1","eslint-plugin-formatjs": "^6.1.2",- "eslint-plugin-import": "^2.22.0",+ "eslint-plugin-import-x": "^4.17.0","eslint-plugin-mdx": "^3.6.2","eslint-plugin-no-jquery": "^4.0.0","eslint-plugin-promise": "^7.2.1",diff --git a/patches/eslint-plugin-import-x.patch b/patches/eslint-plugin-import-x.patchnew file mode 100644index 00000000000..9c163e4df49--- /dev/null+++ b/patches/eslint-plugin-import-x.patch@@ -0,0 +1,126 @@+diff --git a/lib/index.cjs b/lib/index.cjs+index b04314774bb93ff76872fd3a54229f0c5189c04c..4ba475083a031781e8bb88fa97085a3e5e0f45d6 100644+--- a/lib/index.cjs++++ b/lib/index.cjs+@@ -1584,10 +1584,9 @@ var ExportMap = class ExportMap {+ }+ for (const s of n.specifiers) processSpecifier(s, n, m);+ }+- const exports$1 = ["TSExportAssignment"];+- if (isEsModuleInteropTrue()) exports$1.push("TSNamespaceExportDeclaration");+- if (exports$1.includes(n.type)) {+- const exportedName = n.type === "TSNamespaceExportDeclaration" ? (n.id || n.name).name : "expression" in n && n.expression && ("name" in n.expression && n.expression.name || "id" in n.expression && n.expression.id && n.expression.id.name) || null;++ if (n.type === "TSExportAssignment") {++ m.hasExportAssignment = true;++ const exportedName = "expression" in n && n.expression && ("name" in n.expression && n.expression.name || "id" in n.expression && n.expression.id && n.expression.id.name) || null;+ const getRoot = (node) => {+ if (node.left.type === "TSQualifiedName") return getRoot(node.left);+ return node.left;+@@ -1660,6 +1659,8 @@ var ExportMap = class ExportMap {+ /** Dependencies of this module that are not explicitly re-exported */+ imports = new Map();+ exports = new Map();++ /** Whether this module has an `export = ns` assignment */++ hasExportAssignment = false;+ errors = [];+ parseGoal = "ambiguous";+ constructor(path$21) {+@@ -4828,6 +4829,7 @@ var no_named_as_default_member_default = createRule({+ if (fileImport == null) continue;+ for (const { propName, node } of lookups) {+ if (propName === "default") continue;++ if (fileImport.exportMap.hasExportAssignment) continue;+ if (!fileImport.exportMap.namespace.has(propName)) continue;+ context.report({+ node,+@@ -4873,6 +4875,7 @@ var no_named_as_default_default = createRule({+ }+ if (!exportMapOfImported.hasDefault) return;+ if (!exportMapOfImported.has(nameValue)) return;++ if (exportMapOfImported.hasExportAssignment) return;+ if (exportMapOfImported.exports.has("default") && exportMapOfImported.exports.has(nameValue)) context.report({+ node: defaultSpecifier,+ messageId: "default",+diff --git a/lib/rules/no-named-as-default-member.js b/lib/rules/no-named-as-default-member.js+index 3aae00046b68d3ac47549b9570529e867e3c1a88..59452aa7fa42b592c28ccf415c1bba5972f1b027 100644+--- a/lib/rules/no-named-as-default-member.js++++ b/lib/rules/no-named-as-default-member.js+@@ -68,6 +68,9 @@ export default createRule({+ if (propName === 'default') {+ continue;+ }++ if (fileImport.exportMap.hasExportAssignment) {++ continue;++ }+ if (!fileImport.exportMap.namespace.has(propName)) {+ continue;+ }+diff --git a/lib/rules/no-named-as-default.js b/lib/rules/no-named-as-default.js+index cc08f38f05647d150e24e0b596c2caeeecdd362f..5b79fe484ac6ca4975f07c3ce2c8127188d01d07 100644+--- a/lib/rules/no-named-as-default.js++++ b/lib/rules/no-named-as-default.js+@@ -35,6 +35,9 @@ export default createRule({+ if (!exportMapOfImported.has(nameValue)) {+ return;+ }++ if (exportMapOfImported.hasExportAssignment) {++ return;++ }+ if (exportMapOfImported.exports.has('default') &&+ exportMapOfImported.exports.has(nameValue)) {+ context.report({+diff --git a/lib/utils/export-map.d.ts b/lib/utils/export-map.d.ts+index 2c93f36928ba2aa7ffd4e78ebc3111833c9e09d4..0133cac6af6d40734715f987141835ea2e4f8d7a 100644+--- a/lib/utils/export-map.d.ts++++ b/lib/utils/export-map.d.ts+@@ -29,6 +29,7 @@ export declare class ExportMap {+ dependencies: Set<() => ExportMap | null>;+ imports: Map<string, ModuleImport>;+ exports: Map<string, TSESTree.Identifier | TSESTree.ProgramStatement>;++ hasExportAssignment: boolean;+ errors: ParseError[];+ parseGoal: 'ambiguous' | 'Module' | 'Script';+ visitorKeys: TSESLint.SourceCode.VisitorKeys | null;+diff --git a/lib/utils/export-map.js b/lib/utils/export-map.js+index 1595cf11112adf7d40cf947e8b92c489ef386bd2..c1cf2cb33081b314298ece64267be95744ad346e 100644+--- a/lib/utils/export-map.js++++ b/lib/utils/export-map.js+@@ -343,21 +343,15 @@ export class ExportMap {+ processSpecifier(s, n, m);+ }+ }+- const exports = ['TSExportAssignment'];+- if (isEsModuleInteropTrue()) {+- exports.push('TSNamespaceExportDeclaration');+- }+- if (exports.includes(n.type)) {+- const exportedName = n.type === 'TSNamespaceExportDeclaration'+- ? (n.id ||+- n.name).name+- : ('expression' in n &&+- n.expression &&+- (('name' in n.expression && n.expression.name) ||+- ('id' in n.expression &&+- n.expression.id &&+- n.expression.id.name))) ||+- null;++ if (n.type === 'TSExportAssignment') {++ m.hasExportAssignment = true;++ const exportedName = ('expression' in n &&++ n.expression &&++ (('name' in n.expression && n.expression.name) ||++ ('id' in n.expression &&++ n.expression.id &&++ n.expression.id.name))) ||++ null;+ const getRoot = (node) => {+ if (node.left.type === 'TSQualifiedName') {+ return getRoot(node.left);+@@ -470,6 +464,7 @@ export class ExportMap {+ this.dependencies = new Set();+ this.imports = new Map();+ this.exports = new Map();++ this.hasExportAssignment = false;+ this.errors = [];+ this.parseGoal = 'ambiguous';+ }diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 468e0237cb3..e16423e0f6c 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -9,10 +9,13 @@ overrides:openapi-examples-validator>json-schema-ref-parser@^9: npm:@apidevtools/json-schema-ref-parser@^15.3.3source-map@^0.6: npm:source-map-js@^1.2.1+packageExtensionsChecksum: sha256-R25yfbU6VsGMmQcNHdtkUzqfPyebJWL/+FIuE6HhbxI=+patchedDependencies:'@types/[email protected]': ba72573011104d0e73f257182e2f0bd7bff50b60abacd0b923d8b85809984cb8autosize: f08807ede2459b743c2cbdf5c266a685abe39d73930ccc4e469a9cb67cd2560bemail-addresses: 8f663764e3280cf6b463b4d3571f0c89fa63a4a776506b7c7cdec0c72973a013+ eslint-plugin-import-x: 4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7beslint-plugin-no-jquery: d8355ecd29a5d8b9d4f81643da7c1d6b2060db106c5de3aed9e9ee4cb8cef49ahandlebars: 53ad8d748fa2ca3a7a0502c46f2ed1236eef8162efec84c06849dc83ad9e28e9jdenticon: 3c1dcb92454760777e96759a0fb26bd5ab8998d0b4ebba771bc38f2c714c36ec@@ -446,6 +449,9 @@ importers:eslint-config-prettier:specifier: ^10.0.1version: 10.1.8([email protected]([email protected]))+ eslint-import-resolver-typescript:+ specifier: ^4.4.5+ version: 4.4.5([email protected](patch_hash=4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7b)(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])))([email protected])([email protected]([email protected]))eslint-import-resolver-webpack:specifier: ^0.13.4version: 0.13.11([email protected])([email protected])@@ -455,9 +461,9 @@ importers:eslint-plugin-formatjs:specifier: ^6.1.2version: 6.4.9([email protected]([email protected]))- eslint-plugin-import:- specifier: ^2.22.0- version: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ eslint-plugin-import-x:+ specifier: ^4.17.0+ version: 4.17.0(patch_hash=4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7b)(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))eslint-plugin-mdx:specifier: ^3.6.2@@ -1673,9 +1679,15 @@ packages:'@emmetio/[email protected]':resolution: {integrity: sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw==}+ '@emnapi/[email protected]':+ resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==}+'@emnapi/[email protected]':resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==}+ '@emnapi/[email protected]':+ resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==}+'@esbuild/[email protected]':resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==}engines: {node: '>=18'}@@ -2387,6 +2399,12 @@ packages:'@mixmark-io/[email protected]':resolution: {integrity: sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==}+ '@napi-rs/[email protected]':+ resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==}+ peerDependencies:+ '@emnapi/core': ^1.7.1+ '@emnapi/runtime': ^1.7.1+'@noble/[email protected]':resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==}engines: {node: '>= 16'}@@ -2802,6 +2820,9 @@ packages:'@turf/[email protected]':resolution: {integrity: sha512-r+ohqxoyqeigFB0oFrQx/YEHIkOKqcKpCjvZkvZs7Tkv+IFco5MezAd2zd4rzK+0DfFgDP3KpJc7HqrYjvEjhg==}+ '@tybys/[email protected]':+ resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==}+'@types/[email protected]':resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}@@ -3152,6 +3173,126 @@ packages:'@unicode/[email protected]':resolution: {integrity: sha512-advq5p36zZ+PDRUpDkWcHHR++R19kx0LYB5iG3bj0KB8mYVKg0ywS996e2bXeXxDb8XdOF7KTivcx7VkYie1pg==}+ '@unrs/[email protected]':+ resolution: {integrity: sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==}+ cpu: [arm]+ os: [android]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==}+ cpu: [arm64]+ os: [android]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==}+ cpu: [arm64]+ os: [darwin]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==}+ cpu: [x64]+ os: [darwin]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==}+ cpu: [x64]+ os: [freebsd]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==}+ cpu: [arm]+ os: [linux]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==}+ cpu: [arm]+ os: [linux]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==}+ cpu: [loong64]+ os: [linux]+ libc: [glibc]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==}+ cpu: [loong64]+ os: [linux]+ libc: [musl]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==}+ cpu: [ppc64]+ os: [linux]+ libc: [glibc]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==}+ cpu: [riscv64]+ os: [linux]+ libc: [glibc]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==}+ cpu: [riscv64]+ os: [linux]+ libc: [musl]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==}+ cpu: [s390x]+ os: [linux]+ libc: [glibc]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==}+ cpu: [arm64]+ os: [openharmony]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==}+ engines: {node: '>=14.0.0'}+ cpu: [wasm32]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==}+ cpu: [arm64]+ os: [win32]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==}+ cpu: [ia32]+ os: [win32]++ '@unrs/[email protected]':+ resolution: {integrity: sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==}+ cpu: [x64]+ os: [win32]+'@uppy/[email protected]':resolution: {integrity: sha512-DzrOWTbIZHvtgAFXBMYHk2wD27NjpBSVhY2tEiEIUhPd2CxbFRZjHM/N3HOt3VwZEAP471QWFLlJRWPcIY3A2Q==}peerDependencies:@@ -4049,6 +4190,10 @@ packages:resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}engines: {node: '>= 12'}+ resolution: {integrity: sha512-0h+uSNtQGW3D98eQt3jJ8L06Fves8hncB4V/PKdw/Qb8Hnk19VaKuTr55UNRYiSoVa7WwrFls+rh3ux9agmkeQ==}+ engines: {node: '>= 12.0.0'}+resolution: {integrity: sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng==}engines: {node: '>= 18'}@@ -4809,9 +4954,31 @@ packages:peerDependencies:eslint: '>=7.0.0'+ resolution: {integrity: sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==}+ engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}+ peerDependencies:+ unrs-resolver: ^1.0.0+ peerDependenciesMeta:+ unrs-resolver:+ optional: true+resolution: {integrity: sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ==}+ resolution: {integrity: sha512-nbE5XLph6TLtGYcu/U6e6ZVXyKBhbDWK5cLGk76eJ7NdZpwf1P9EFkpt1Z01mNZNrrilsAYWKH6zUkL4reoXbw==}+ engines: {node: ^16.17.0 || >=18.6.0}+ peerDependencies:+ eslint: '*'+ eslint-plugin-import: '*'+ eslint-plugin-import-x: '*'+ peerDependenciesMeta:+ eslint-plugin-import:+ optional: true+ eslint-plugin-import-x:+ optional: true+resolution: {integrity: sha512-RGFDrCHSmCKGuaoI1zmZT028weIFIEyfSy0nAwzp5rplutWDC+BBjvZS2l4bEgSOfjc+ILkSLxeszkslyNO6fQ==}engines: {node: '>= 6'}@@ -4861,6 +5028,19 @@ packages:peerDependencies:eslint: 9 || 10+ resolution: {integrity: sha512-aM7V25Bg6YuYxtEhwjafzfS0NTMds1D2PMQI0K4KqJxQJRtkP4CO+MQTWRdBq2qAnmPxTxLevhXUBtByxJqS1w==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}+ peerDependencies:+ '@typescript-eslint/utils': ^8.56.0+ eslint: ^8.57.0 || ^9.0.0 || ^10.0.0+ eslint-import-resolver-node: '*'+ peerDependenciesMeta:+ '@typescript-eslint/utils':+ optional: true+ eslint-import-resolver-node:+ optional: true+resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==}engines: {node: '>=4'}@@ -5345,6 +5525,9 @@ packages:resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==}+resolution: {integrity: sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==}engines: {node: '>=20.20.0'}@@ -5919,6 +6102,9 @@ packages:resolution: {integrity: sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==}engines: {node: '>=18.20'}+ resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==}+resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}engines: {node: '>= 0.4'}@@ -6927,6 +7113,11 @@ packages:engines: {node: ^18 || >=20}hasBin: true+ resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==}+ engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}+ hasBin: true+resolution: {integrity: sha512-zkVhZUA3y8mbz652WrL5x0fB0ehrBkulWT3TomAQ9iDtyXZvzKeEA6GPxAItBYeNYl5yngKRX612qHOhvMkDeg==}@@ -8736,6 +8927,10 @@ packages:resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==}engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}+ resolution: {integrity: sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==}+ engines: {node: '>=12.0.0'}+resolution: {integrity: sha512-vjUc6sfgtgY0dxCdnc40mK6Oftjo9+2K8H/NG81TMhgL392FtiPA9tn9RLyTxXmTLPJPjF3VyzFp6bsWFLisMQ==}@@ -8965,6 +9160,10 @@ packages:resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==}engines: {node: '>=10.0.0'}+ resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==}+ engines: {node: '>=20'}+resolution: {integrity: sha512-jX8Et4hHg57mug1/079yitEKWGB3LCwoxByLsNim89LABq8NqgiX+6iYVOsq0vX8uJHkU+DZ5fnq95f800bEsQ==}engines: {node: '>=0.6'}@@ -9237,6 +9436,10 @@ packages:resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==}engines: {node: '>=14.16'}+ resolution: {integrity: sha512-1URUxUqfHFM1c+zfSPsa3gnkO7Aq21qyH75SIduNYz4SzY964rn1X2vCMQaHSHhktiw+0kPa2iyb6PUpXqB6Vg==}+ engines: {node: '>=20'}+resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}engines: {node: '>= 0.6'}@@ -9443,6 +9646,9 @@ packages:resolution: {integrity: sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==}+ resolution: {integrity: sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==}+resolution: {integrity: sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg==}peerDependencies:@@ -11372,11 +11578,22 @@ snapshots:'@emmetio/[email protected]': {}+ '@emnapi/[email protected]':+ dependencies:+ '@emnapi/wasi-threads': 1.2.1+ tslib: 2.8.1+ optional: true+'@emnapi/[email protected]':dependencies:tslib: 2.8.1optional: true+ '@emnapi/[email protected]':+ dependencies:+ tslib: 2.8.1+ optional: true+'@esbuild/[email protected]':optional: true@@ -11980,6 +12197,13 @@ snapshots:'@mixmark-io/[email protected]': {}+ dependencies:+ '@emnapi/core': 1.10.0+ '@emnapi/runtime': 1.10.0+ '@tybys/wasm-util': 0.10.3+ optional: true+'@noble/[email protected]': {}'@nodelib/[email protected]':@@ -12462,6 +12686,11 @@ snapshots:'@types/geojson': 7946.0.16tslib: 2.8.1+ '@tybys/[email protected]':+ dependencies:+ tslib: 2.8.1+ optional: true+'@types/[email protected]':dependencies:'@types/node': 24.12.4@@ -12877,6 +13106,76 @@ snapshots:'@unicode/[email protected]': {}+ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ dependencies:+ '@emnapi/core': 1.10.0+ '@emnapi/runtime': 1.10.0+ '@napi-rs/wasm-runtime': 1.1.6(@emnapi/[email protected])(@emnapi/[email protected])+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true++ '@unrs/[email protected]':+ optional: true+'@uppy/[email protected](@uppy/[email protected])':dependencies:'@uppy/core': 5.2.0@@ -13976,6 +14275,8 @@ snapshots:+ [email protected]: {}+@@ -14797,6 +15098,14 @@ snapshots:dependencies:eslint: 9.39.4([email protected])+ dependencies:+ get-tsconfig: 4.14.0+ stable-hash-x: 0.2.0+ type-fest: 5.7.0+ optionalDependencies:+ unrs-resolver: 1.12.2+dependencies:debug: 3.2.7@@ -14805,11 +15114,27 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected]([email protected](patch_hash=4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7b)(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])))([email protected])([email protected]([email protected])):+ dependencies:+ debug: 4.4.3+ eslint: 9.39.4([email protected])+ eslint-import-context: 0.1.9([email protected])+ get-tsconfig: 4.14.0+ is-bun-module: 2.0.0+ stable-hash-x: 0.2.0+ tinyglobby: 0.2.16+ unrs-resolver: 1.12.2+ optionalDependencies:+ eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected]))+ eslint-plugin-import-x: 4.17.0(patch_hash=4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7b)(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ transitivePeerDependencies:+ - supports-color+dependencies:debug: 3.2.7enhanced-resolve: 0.9.1- eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected]))find-root: 1.1.0hasown: 2.0.3interpret: 1.4.0@@ -14843,13 +15168,14 @@ snapshots:- bluebird- supports-color- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected])):+ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected])):dependencies:debug: 3.2.7optionalDependencies:eslint: 9.39.4([email protected])eslint-import-resolver-node: 0.3.10+ eslint-import-resolver-typescript: 4.4.5([email protected](patch_hash=4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7b)(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])))([email protected])([email protected]([email protected]))eslint-import-resolver-webpack: 0.13.11([email protected])([email protected])transitivePeerDependencies:- supports-color@@ -14880,7 +15206,25 @@ snapshots:transitivePeerDependencies:- ts-jest- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])):+ [email protected](patch_hash=4b2f91d2af2627350ed208a16b14e72b6115c969898ad72c0c22e151b9ce6c7b)(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])):+ dependencies:+ '@typescript-eslint/types': 8.59.3+ comment-parser: 1.4.7+ debug: 4.4.3+ eslint: 9.39.4([email protected])+ eslint-import-context: 0.1.9([email protected])+ is-glob: 4.0.3+ minimatch: 10.2.5+ semver: 7.8.0+ stable-hash-x: 0.2.0+ unrs-resolver: 1.12.2+ optionalDependencies:+ eslint-import-resolver-node: 0.3.10+ transitivePeerDependencies:+ - supports-color++ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected])):dependencies:'@rtsao/scc': 1.1.0array-includes: 3.1.9@@ -14891,7 +15235,7 @@ snapshots:doctrine: 2.1.0eslint: 9.39.4([email protected])eslint-import-resolver-node: 0.3.10- eslint-module-utils: 2.12.1(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected]))+ eslint-module-utils: 2.12.1(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))hasown: 2.0.3is-core-module: 2.16.2is-glob: 4.0.3@@ -15501,6 +15845,10 @@ snapshots:es-errors: 1.3.0get-intrinsic: 1.3.0+ dependencies:+ resolve-pkg-maps: 1.0.0+dependencies:resolve-pkg-maps: 1.0.0@@ -16292,6 +16640,10 @@ snapshots:dependencies:builtin-modules: 5.2.0+ dependencies:+ semver: 7.8.0+@@ -17636,6 +17988,8 @@ snapshots:+ [email protected]: {}+@@ -20265,6 +20619,8 @@ snapshots:dependencies:minipass: 3.3.6+ [email protected]: {}+@@ -20567,6 +20923,8 @@ snapshots:string-width: 4.2.3strip-ansi: 6.0.1+ [email protected]: {}+@@ -20823,6 +21181,10 @@ snapshots:+ dependencies:+ tagged-tag: 1.0.0+dependencies:media-typer: 0.3.0@@ -21100,6 +21462,33 @@ snapshots:+ dependencies:+ napi-postinstall: 0.3.4+ optionalDependencies:+ '@unrs/resolver-binding-android-arm-eabi': 1.12.2+ '@unrs/resolver-binding-android-arm64': 1.12.2+ '@unrs/resolver-binding-darwin-arm64': 1.12.2+ '@unrs/resolver-binding-darwin-x64': 1.12.2+ '@unrs/resolver-binding-freebsd-x64': 1.12.2+ '@unrs/resolver-binding-linux-arm-gnueabihf': 1.12.2+ '@unrs/resolver-binding-linux-arm-musleabihf': 1.12.2+ '@unrs/resolver-binding-linux-arm64-gnu': 1.12.2+ '@unrs/resolver-binding-linux-arm64-musl': 1.12.2+ '@unrs/resolver-binding-linux-loong64-gnu': 1.12.2+ '@unrs/resolver-binding-linux-loong64-musl': 1.12.2+ '@unrs/resolver-binding-linux-ppc64-gnu': 1.12.2+ '@unrs/resolver-binding-linux-riscv64-gnu': 1.12.2+ '@unrs/resolver-binding-linux-riscv64-musl': 1.12.2+ '@unrs/resolver-binding-linux-s390x-gnu': 1.12.2+ '@unrs/resolver-binding-linux-x64-gnu': 1.12.2+ '@unrs/resolver-binding-linux-x64-musl': 1.12.2+ '@unrs/resolver-binding-openharmony-arm64': 1.12.2+ '@unrs/resolver-binding-wasm32-wasi': 1.12.2+ '@unrs/resolver-binding-win32-arm64-msvc': 1.12.2+ '@unrs/resolver-binding-win32-ia32-msvc': 1.12.2+ '@unrs/resolver-binding-win32-x64-msvc': 1.12.2+dependencies:anymatch: 3.1.3diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex dd861711573..8939028d8a8 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -8,10 +8,17 @@ overrides:openapi-examples-validator>json-schema-ref-parser@^9: npm:@apidevtools/json-schema-ref-parser@^15.3.3source-map@^0.6: npm:source-map-js@^1.2.1+packageExtensions:+ # https://github.com/un-ts/eslint-import-context/issues/32+ eslint-import-context:+ dependencies:+ type-fest: "*"+patchedDependencies:"@types/[email protected]": patches/@[email protected] # https://github.com/DefinitelyTyped/DefinitelyTyped/pull/74984autosize: patches/autosize.patchemail-addresses: patches/email-addresses.patch # https://github.com/jackbearheart/email-addresses/pull/81+ eslint-plugin-import-x: patches/eslint-plugin-import-x.patch # https://github.com/un-ts/eslint-plugin-import-x/pull/492eslint-plugin-no-jquery: patches/eslint-plugin-no-jquery.patch # https://github.com/wikimedia/eslint-plugin-no-jquery/pull/363handlebars: patches/handlebars.patch # https://github.com/handlebars-lang/handlebars.js/pull/2053jdenticon: patches/jdenticon.patch # https://github.com/dmester/jdenticon/pull/56@@ -28,4 +35,5 @@ allowBuilds:sharp: falsesleep: falsettf2woff2: false+ unrs-resolver: falsevnu-jar: falsediff --git a/starlight_help/src/components/RelativeSteps.astro b/starlight_help/src/components/RelativeSteps.astroindex c7eb65e4aa8..fc0f20f3c87 100644--- a/starlight_help/src/components/RelativeSteps.astro+++ b/starlight_help/src/components/RelativeSteps.astro@@ -1,7 +1,7 @@---import {CORPORATE_ENABLED, SHOW_RELATIVE_LINKS} from "astro:env/client";-/* eslint-disable import/extensions */+/* eslint-disable import-x/extensions */import BarChartIcon from "~icons/zulip-icon/bar-chart";import BuildingIcon from "~icons/zulip-icon/building";import CreditCardIcon from "~icons/zulip-icon/credit-card";@@ -16,7 +16,7 @@ import ManageSearchIcon from "~icons/zulip-icon/manage-search";import RocketIcon from "~icons/zulip-icon/rocket";import ToolIcon from "~icons/zulip-icon/tool";import UserGroupCogIcon from "~icons/zulip-icon/user-group-cog";-/* eslint-enable import/extensions */+/* eslint-enable import-x/extensions */type Props = {link_type: string;diff --git a/starlight_help/src/components/SettingsSteps.astro b/starlight_help/src/components/SettingsSteps.astroindex e14968eb582..5f48cf916db 100644--- a/starlight_help/src/components/SettingsSteps.astro+++ b/starlight_help/src/components/SettingsSteps.astro@@ -1,11 +1,11 @@---import {SHOW_RELATIVE_LINKS} from "astro:env/client";-/* eslint-disable import/extensions */+/* eslint-disable import-x/extensions */import BuildingIcon from "~icons/zulip-icon/building";import GearIcon from "~icons/zulip-icon/gear";import ToolIcon from "~icons/zulip-icon/tool";-/* eslint-enable import/extensions */+/* eslint-enable import-x/extensions */const PERSONAL_SETTINGS_TYPE = "Personal settings";const ORGANIZATION_SETTINGS_TYPE = "Organization settings";diff --git a/web/src/favicon.ts b/web/src/favicon.tsindex 727f0dd8177..bf8d3cc9618 100644--- a/web/src/favicon.ts+++ b/web/src/favicon.ts@@ -4,7 +4,7 @@ import static_favicon_image from "../../static/images/favicon.svg";import render_favicon_svg from "../templates/favicon.svg.hbs";import * as blueslip from "./blueslip.ts";-import favicon_font_url_html from "./favicon_font_url!=!url-loader!font-subset-loader2?glyphs=0123456789KMGT∞!source-sans/TTF/SourceSans3-Bold.ttf"; // eslint-disable-line import/extensions+import favicon_font_url_html from "./favicon_font_url!=!url-loader!font-subset-loader2?glyphs=0123456789KMGT∞!source-sans/TTF/SourceSans3-Bold.ttf"; // eslint-disable-line import-x/extensionslet favicon_state: {image: HTMLImageElement; url: string} | undefined;diff --git a/web/src/stats/stats.ts b/web/src/stats/stats.tsindex ee23b900db9..3e0abc04302 100644--- a/web/src/stats/stats.ts+++ b/web/src/stats/stats.ts@@ -1,7 +1,7 @@import {$} from "jquery";import assert from "minimalistic-assert";import PlotlyBar from "plotly.js/lib/bar";-import Plotly from "plotly.js/lib/core";+import Plotly from "plotly.js/lib/core"; // eslint-disable-line import-x/defaultimport PlotlyPie from "plotly.js/lib/pie";import * as tippy from "tippy.js";import * as z from "zod/mini";