Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Add eslint-plugin-mdx.
Anders Kaseorg619cb0dd4f56
diff --git a/eslint.config.js b/eslint.config.jsindex 8972146849a..5113ff9dd0f 100644--- a/eslint.config.js+++ b/eslint.config.js@@ -5,6 +5,7 @@ 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 mdx from "eslint-plugin-mdx";import noJquery from "eslint-plugin-no-jquery";import unicorn from "eslint-plugin-unicorn";import globals from "globals";@@ -36,6 +37,7 @@ export default tseslint.config(prettier,tseslint.configs.strictTypeChecked,tseslint.configs.stylisticTypeChecked,+ mdx.flat,{files: ["**/*.cts", "**/*.mts", "**/*.ts"],extends: [importPlugin.flatConfigs.typescript],@@ -185,6 +187,7 @@ export default tseslint.config(ignores: ["**/*.cts", "**/*.mts", "**/*.ts"],extends: [tseslint.configs.disableTypeChecked],rules: {+ "@typescript-eslint/consistent-type-imports": "off","@typescript-eslint/explicit-function-return-type": "off","@typescript-eslint/no-require-imports": "off","consistent-return": "error",@@ -199,6 +202,17 @@ export default tseslint.config(sourceType: "commonjs",},},+ {+ files: ["**/*.mdx"],+ rules: {+ "@typescript-eslint/no-unused-vars": "off",+ "comma-spacing": "error",+ "import/extensions": "off",+ "import/unambiguous": "off",+ "object-curly-spacing": "error",+ quotes: "error",+ },+ },{files: ["web/tests/**"],rules: {diff --git a/package.json b/package.jsonindex db99be24027..a3ac0f2dafc 100644--- a/package.json+++ b/package.json@@ -142,6 +142,7 @@"eslint-plugin-astro": "^1.3.1","eslint-plugin-formatjs": "^5.0.0","eslint-plugin-import": "^2.22.0",+ "eslint-plugin-mdx": "^3.6.2","eslint-plugin-no-jquery": "^3.0.2","eslint-plugin-unicorn": "^60.0.0","globals": "^16.0.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 15c13fc3086..e70c6acf7ab 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -446,6 +446,9 @@ importers:eslint-plugin-import:specifier: ^2.22.0version: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ eslint-plugin-mdx:+ specifier: ^3.6.2eslint-plugin-no-jquery:specifier: ^3.0.2version: 3.1.1([email protected]([email protected]))@@ -4703,6 +4706,16 @@ packages:eslint-plugin-import: '>=1.4.0'webpack: '>=1.11.0'+ resolution: {integrity: sha512-5hczn5iSSEcwtNtVXFwCKIk6iLEDaZpwc3vjYDl/B779OzaAAK/ou16J2xVdO6ecOLEO1WZqp7MRCQ/WsKDUig==}+ engines: {node: '>=18.0.0'}+ peerDependencies:+ eslint: '>=8.0.0'+ remark-lint-file-extension: '*'+ peerDependenciesMeta:+ remark-lint-file-extension:+ optional: true+resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==}engines: {node: '>=4'}@@ -4745,6 +4758,12 @@ packages:'@typescript-eslint/parser':optional: true+ resolution: {integrity: sha512-RfMd5HYD/9+cqANhVWJbuBRg3huWUsAoGJNGmPsyiRD2X6BaG6bvt1omyk1ORlg81GK8ST7Ojt5fNAuwWhWU8A==}+ engines: {node: '>=18.0.0'}+ peerDependencies:+ eslint: '>=8.0.0'+resolution: {integrity: sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==}peerDependencies:@@ -6747,6 +6766,10 @@ packages:resolution: {integrity: sha512-+OfYBiUOCTWcTECES49neZwL5AoGkXE+lFjIvzwNCnYRlso+EnfvovcBxGoyQ0yQt806eSPjS675K0EwWknXmw==}+ resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}engines: {node: '>=10'}@@ -8304,6 +8327,10 @@ packages:resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==}+ resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==}engines: {node: '>=0.4'}@@ -9390,6 +9417,11 @@ packages:resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}hasBin: true+ resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==}+ engines: {node: '>=8'}+ hasBin: true+resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==}@@ -14686,6 +14718,28 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ acorn: 8.15.0+ acorn-jsx: 5.3.2([email protected])+ eslint: 9.33.0([email protected])+ espree: 10.4.0+ estree-util-visit: 2.0.0+ remark-mdx: 3.1.0+ remark-parse: 11.0.0+ remark-stringify: 11.0.0+ synckit: 0.11.11+ unified: 11.0.5+ unified-engine: 11.2.2+ unist-util-visit: 5.0.0+ uvu: 0.5.6+ vfile: 6.0.3+ optionalDependencies:+ remark-lint-file-extension: 3.0.1+ transitivePeerDependencies:+ - bluebird+ - supports-color+[email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected])):dependencies:debug: 3.2.7@@ -14757,6 +14811,24 @@ snapshots:- eslint-import-resolver-webpack- supports-color+ dependencies:+ eslint: 9.33.0([email protected])+ mdast-util-from-markdown: 2.0.2+ mdast-util-mdx: 3.0.0+ micromark-extension-mdxjs: 3.0.0+ remark-mdx: 3.1.0+ remark-parse: 11.0.0+ remark-stringify: 11.0.0+ synckit: 0.11.11+ unified: 11.0.5+ vfile: 6.0.3+ transitivePeerDependencies:+ - bluebird+ - remark-lint-file-extension+ - supports-color+dependencies:eslint: 9.33.0([email protected])@@ -17442,6 +17514,8 @@ snapshots:signum: 1.0.0to-px: 1.0.1+ [email protected]: {}+@@ -19689,6 +19763,10 @@ snapshots:+ dependencies:+ mri: 1.2.0+dependencies:call-bind: 1.0.8@@ -20969,6 +21047,13 @@ snapshots:+ dependencies:+ dequal: 2.0.3+ diff: 5.2.0+ kleur: 4.1.5+ sade: 1.8.1+dependencies:spdx-correct: 3.2.0diff --git a/tools/lint b/tools/lintindex ad90f278d38..a2d496a9fcc 100755--- a/tools/lint+++ b/tools/lint@@ -84,7 +84,7 @@ def run() -> None:linter_config.external_linter("eslint",["node_modules/.bin/eslint", "--max-warnings=0", "--cache"],- ["astro", "cjs", "cts", "js", "mjs", "mts", "ts"],+ ["astro", "cjs", "cts", "js", "mdx", "mjs", "mts", "ts"],fix_arg="--fix",description="Standard JavaScript style and formatting linter (config: eslint.config.js).",)diff --git a/version.py b/version.pyindex fda149b6bea..e0291510e94 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 = (343, 0) # bumped 2025-08-28 to move @types/mdast away from dev dependencies.+PROVISION_VERSION = (343, 1) # bumped 2025-09-03 to add eslint-plugin-mdx