mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	eslint: Type-check ESLint configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							1e463d1db5
						
					
				
				
					commit
					56fc587dfd
				
			@@ -1,6 +1,9 @@
 | 
				
			|||||||
 | 
					// @ts-check
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import {FlatCompat} from "@eslint/eslintrc";
 | 
					import {FlatCompat} from "@eslint/eslintrc";
 | 
				
			||||||
import js from "@eslint/js";
 | 
					import js from "@eslint/js";
 | 
				
			||||||
import confusingBrowserGlobals from "confusing-browser-globals";
 | 
					import confusingBrowserGlobals from "confusing-browser-globals";
 | 
				
			||||||
 | 
					import {defineConfig} from "eslint/config";
 | 
				
			||||||
import prettier from "eslint-config-prettier";
 | 
					import prettier from "eslint-config-prettier";
 | 
				
			||||||
import {configs as astroConfigs} from "eslint-plugin-astro";
 | 
					import {configs as astroConfigs} from "eslint-plugin-astro";
 | 
				
			||||||
import formatjs from "eslint-plugin-formatjs";
 | 
					import formatjs from "eslint-plugin-formatjs";
 | 
				
			||||||
@@ -13,7 +16,7 @@ import tseslint from "typescript-eslint";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const compat = new FlatCompat({baseDirectory: import.meta.dirname});
 | 
					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.
 | 
					        // This is intended for generated files and vendored third-party files.
 | 
				
			||||||
        // For our source code, instead of adding files here, consider using
 | 
					        // For our source code, instead of adding files here, consider using
 | 
				
			||||||
@@ -29,7 +32,8 @@ export default tseslint.config(
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    js.configs.recommended,
 | 
					    js.configs.recommended,
 | 
				
			||||||
    importPlugin.flatConfigs.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,
 | 
					    unicorn.configs.recommended,
 | 
				
			||||||
    prettier,
 | 
					    prettier,
 | 
				
			||||||
    tseslint.configs.strictTypeChecked,
 | 
					    tseslint.configs.strictTypeChecked,
 | 
				
			||||||
@@ -318,7 +322,7 @@ export default tseslint.config(
 | 
				
			|||||||
            "unicorn/prefer-string-replace-all": "off",
 | 
					            "unicorn/prefer-string-replace-all": "off",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    ...astroConfigs.recommended,
 | 
					    astroConfigs.recommended,
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        files: ["starlight_help/src/components/ZulipNote.astro"],
 | 
					        files: ["starlight_help/src/components/ZulipNote.astro"],
 | 
				
			||||||
        rules: {
 | 
					        rules: {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -105,6 +105,7 @@
 | 
				
			|||||||
    "@types/blueimp-md5": "^2.18.0",
 | 
					    "@types/blueimp-md5": "^2.18.0",
 | 
				
			||||||
    "@types/co-body": "^6.1.3",
 | 
					    "@types/co-body": "^6.1.3",
 | 
				
			||||||
    "@types/confusing-browser-globals": "^1.0.3",
 | 
					    "@types/confusing-browser-globals": "^1.0.3",
 | 
				
			||||||
 | 
					    "@types/eslint-config-prettier": "^6.11.3",
 | 
				
			||||||
    "@types/gtag.js": "^0.0.20",
 | 
					    "@types/gtag.js": "^0.0.20",
 | 
				
			||||||
    "@types/is-url": "^1.2.32",
 | 
					    "@types/is-url": "^1.2.32",
 | 
				
			||||||
    "@types/jquery": "^3.3.31",
 | 
					    "@types/jquery": "^3.3.31",
 | 
				
			||||||
@@ -125,6 +126,7 @@
 | 
				
			|||||||
    "@types/winchan": "^0.2.0",
 | 
					    "@types/winchan": "^0.2.0",
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin": "^8.2.0",
 | 
					    "@typescript-eslint/eslint-plugin": "^8.2.0",
 | 
				
			||||||
    "@typescript-eslint/parser": "^8.2.0",
 | 
					    "@typescript-eslint/parser": "^8.2.0",
 | 
				
			||||||
 | 
					    "@typescript-eslint/utils": "^8.25.0",
 | 
				
			||||||
    "astro-eslint-parser": "^1.2.2",
 | 
					    "astro-eslint-parser": "^1.2.2",
 | 
				
			||||||
    "babel-plugin-istanbul": "^7.0.0",
 | 
					    "babel-plugin-istanbul": "^7.0.0",
 | 
				
			||||||
    "callsites": "^4.2.0",
 | 
					    "callsites": "^4.2.0",
 | 
				
			||||||
@@ -170,6 +172,7 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "pnpm": {
 | 
					  "pnpm": {
 | 
				
			||||||
    "overrides": {
 | 
					    "overrides": {
 | 
				
			||||||
 | 
					      "@types/eslint": "-",
 | 
				
			||||||
      "source-map@^0.6": "npm:source-map-js@^1.2.1"
 | 
					      "source-map@^0.6": "npm:source-map-js@^1.2.1"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "patchedDependencies": {
 | 
					    "patchedDependencies": {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										22
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										22
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@@ -5,6 +5,7 @@ settings:
 | 
				
			|||||||
  excludeLinksFromLockfile: false
 | 
					  excludeLinksFromLockfile: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
overrides:
 | 
					overrides:
 | 
				
			||||||
 | 
					  '@types/eslint': '-'
 | 
				
			||||||
  source-map@^0.6: npm:source-map-js@^1.2.1
 | 
					  source-map@^0.6: npm:source-map-js@^1.2.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
patchedDependencies:
 | 
					patchedDependencies:
 | 
				
			||||||
@@ -335,6 +336,9 @@ importers:
 | 
				
			|||||||
      '@types/confusing-browser-globals':
 | 
					      '@types/confusing-browser-globals':
 | 
				
			||||||
        specifier: ^1.0.3
 | 
					        specifier: ^1.0.3
 | 
				
			||||||
        version: 1.0.3
 | 
					        version: 1.0.3
 | 
				
			||||||
 | 
					      '@types/eslint-config-prettier':
 | 
				
			||||||
 | 
					        specifier: ^6.11.3
 | 
				
			||||||
 | 
					        version: 6.11.3
 | 
				
			||||||
      '@types/gtag.js':
 | 
					      '@types/gtag.js':
 | 
				
			||||||
        specifier: ^0.0.20
 | 
					        specifier: ^0.0.20
 | 
				
			||||||
        version: 0.0.20
 | 
					        version: 0.0.20
 | 
				
			||||||
@@ -395,6 +399,9 @@ importers:
 | 
				
			|||||||
      '@typescript-eslint/parser':
 | 
					      '@typescript-eslint/parser':
 | 
				
			||||||
        specifier: ^8.2.0
 | 
					        specifier: ^8.2.0
 | 
				
			||||||
        version: 8.42.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)
 | 
					        version: 8.42.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)
 | 
				
			||||||
 | 
					      '@typescript-eslint/utils':
 | 
				
			||||||
 | 
					        specifier: ^8.25.0
 | 
				
			||||||
 | 
					        version: 8.42.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)
 | 
				
			||||||
      astro-eslint-parser:
 | 
					      astro-eslint-parser:
 | 
				
			||||||
        specifier: ^1.2.2
 | 
					        specifier: ^1.2.2
 | 
				
			||||||
        version: 1.2.2
 | 
					        version: 1.2.2
 | 
				
			||||||
@@ -2705,12 +2712,12 @@ packages:
 | 
				
			|||||||
  '@types/debug@4.1.12':
 | 
					  '@types/debug@4.1.12':
 | 
				
			||||||
    resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
 | 
					    resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  '@types/eslint-config-prettier@6.11.3':
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-3wXCiM8croUnhg9LdtZUJQwNcQYGWxxdOWDjPe1ykCqJFPVpzAKfs/2dgSoCtAvdPeaponcWPI7mPcGGp9dkKQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/eslint-scope@3.7.7':
 | 
					  '@types/eslint-scope@3.7.7':
 | 
				
			||||||
    resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
 | 
					    resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/eslint@9.6.1':
 | 
					 | 
				
			||||||
    resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  '@types/estree-jsx@1.0.5':
 | 
					  '@types/estree-jsx@1.0.5':
 | 
				
			||||||
    resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
 | 
					    resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -12358,16 +12365,12 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@types/ms': 2.1.0
 | 
					      '@types/ms': 2.1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  '@types/eslint-config-prettier@6.11.3': {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/eslint-scope@3.7.7':
 | 
					  '@types/eslint-scope@3.7.7':
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@types/eslint': 9.6.1
 | 
					 | 
				
			||||||
      '@types/estree': 1.0.8
 | 
					      '@types/estree': 1.0.8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  '@types/eslint@9.6.1':
 | 
					 | 
				
			||||||
    dependencies:
 | 
					 | 
				
			||||||
      '@types/estree': 1.0.8
 | 
					 | 
				
			||||||
      '@types/json-schema': 7.0.15
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  '@types/estree-jsx@1.0.5':
 | 
					  '@types/estree-jsx@1.0.5':
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@types/estree': 1.0.8
 | 
					      '@types/estree': 1.0.8
 | 
				
			||||||
@@ -14788,7 +14791,6 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@formatjs/icu-messageformat-parser': 2.11.2
 | 
					      '@formatjs/icu-messageformat-parser': 2.11.2
 | 
				
			||||||
      '@formatjs/ts-transformer': 3.14.0
 | 
					      '@formatjs/ts-transformer': 3.14.0
 | 
				
			||||||
      '@types/eslint': 9.6.1
 | 
					 | 
				
			||||||
      '@types/picomatch': 3.0.2
 | 
					      '@types/picomatch': 3.0.2
 | 
				
			||||||
      '@typescript-eslint/utils': 8.42.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)
 | 
					      '@typescript-eslint/utils': 8.42.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)
 | 
				
			||||||
      eslint: 9.34.0(jiti@2.5.1)
 | 
					      eslint: 9.34.0(jiti@2.5.1)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,4 +49,4 @@ API_FEATURE_LEVEL = 425
 | 
				
			|||||||
#   historical commits sharing the same major version, in which case a
 | 
					#   historical commits sharing the same major version, in which case a
 | 
				
			||||||
#   minor version bump suffices.
 | 
					#   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-prettier
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										37
									
								
								web/src/types/eslint-plugin-no-jquery.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								web/src/types/eslint-plugin-no-jquery.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -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;
 | 
				
			||||||
		Reference in New Issue
	
	Block a user