Skip to content

Commit 8773fd8

Browse files
committed
Merge remote-tracking branch 'origin/main' into eslint-enable-no-unused-vars-no-redundant-type-constituents
2 parents 40b6341 + 848fe48 commit 8773fd8

File tree

62 files changed

+2404
-658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2404
-658
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 285 additions & 4 deletions
Large diffs are not rendered by default.

configs/eslint-config-compass/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const path = require('path');
44
const shared = require('@mongodb-js/eslint-config-devtools');
55
const common = require('@mongodb-js/eslint-config-devtools/common');
6+
const chaiFriendly = require('eslint-plugin-chai-friendly');
67

78
const extraTsRules = {
89
// Newly converted plugins use `any` quite a lot, we can't enable the rule,
@@ -15,22 +16,19 @@ const extraTsRules = {
1516
'error',
1617
{ fixMixedExportsWithInlineTypeSpecifier: false },
1718
],
19+
// We use chai outside of tests, hence applying these rules to all ts files
20+
...chaiFriendly.configs.recommended.rules,
1821
'@typescript-eslint/prefer-promise-reject-errors': 'off',
1922
'@typescript-eslint/only-throw-error': 'off',
2023

2124
// TODO: a lot new hits with latest typescript-eslint, we should gradually
2225
// clean those out and re-enable the rules
2326
'@typescript-eslint/no-explicit-any': 'warn',
2427
'@typescript-eslint/no-base-to-string': 'warn',
25-
'@typescript-eslint/no-require-imports': 'warn',
26-
'@typescript-eslint/no-unused-expressions': 'off', // replace with eslint-plugin-chai-friendly
2728
'@typescript-eslint/unbound-method': 'warn',
2829
'@typescript-eslint/no-duplicate-type-constituents': 'warn',
2930
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
30-
'@typescript-eslint/no-floating-promises': 'warn',
3131
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
32-
'@typescript-eslint/no-misused-promises': 'warn',
33-
'@typescript-eslint/no-duplicate-enum-values': 'warn',
3432
};
3533

3634
const tsRules = {
@@ -100,7 +98,7 @@ const testTsOverrides = {
10098
};
10199

102100
module.exports = {
103-
plugins: [...shared.plugins, '@mongodb-js/compass'],
101+
plugins: [...shared.plugins, '@mongodb-js/compass', 'chai-friendly'],
104102
rules: {
105103
...shared.rules,
106104
'@mongodb-js/compass/no-leafygreen-outside-compass-components': 'error',

configs/eslint-config-compass/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@typescript-eslint/parser": "^8.34.0",
2323
"eslint": "^8.57.1",
2424
"eslint-config-prettier": "^8.3.0",
25+
"eslint-plugin-chai-friendly": "^1.1.0",
2526
"eslint-plugin-filename-rules": "^1.2.0",
2627
"eslint-plugin-jsx-a11y": "^6.10.2",
2728
"eslint-plugin-mocha": "^8.0.0",

configs/webpack-config-compass/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export function createElectronRendererConfig(
301301
export function createWebConfig(args: Partial<ConfigArgs>): WebpackConfig {
302302
const opts = webpackArgsWithDefaults(args, { target: 'web' });
303303

304-
// eslint-disable-next-line @typescript-eslint/no-var-requires
304+
// eslint-disable-next-line @typescript-eslint/no-require-imports
305305
const { peerDependencies } = require(path.join(opts.cwd, 'package.json')) as {
306306
peerDependencies: Record<string, string>;
307307
};

configs/webpack-config-compass/src/loaders.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { isServe } from './args';
77
import chalk from 'chalk';
88

99
function isLatestBrowserslist() {
10-
// eslint-disable-next-line @typescript-eslint/no-var-requires
10+
// eslint-disable-next-line @typescript-eslint/no-require-imports
1111
const browserslistVersion = require('browserslist/package.json').version;
1212
const command = `npm view browserslist version --json`;
1313
const latestBrowserslistVersion = JSON.parse(
@@ -18,7 +18,7 @@ function isLatestBrowserslist() {
1818
}
1919

2020
const electronVersion = (() => {
21-
// eslint-disable-next-line @typescript-eslint/no-var-requires
21+
// eslint-disable-next-line @typescript-eslint/no-require-imports
2222
const [maj, min] = require('electron/package.json').version.split(
2323
'.'
2424
) as string[];

configs/webpack-config-compass/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function camelCase(str: string): string {
6262
}
6363

6464
export function getLibraryNameFromCwd(cwd: string): string {
65-
// eslint-disable-next-line @typescript-eslint/no-var-requires
65+
// eslint-disable-next-line @typescript-eslint/no-require-imports
6666
const { name, productName } = require(path.join(cwd, 'package.json')) as {
6767
name: string;
6868
productName: string;

docs/tracking-plan.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
> the tracking plan for the specific Compass version you can use the following
77
> URL: `https://github.com/mongodb-js/compass/blob/<compass version>/docs/tracking-plan.md`
88
9-
Generated on Fri, Jun 13, 2025
9+
Generated on Mon, Jun 16, 2025
1010

1111
## Table of Contents
1212

@@ -164,6 +164,7 @@ Generated on Fri, Jun 13, 2025
164164
- [Code Equivalent Toggled](#event--CreateIndexCodeEquivalentToggled)
165165
- [Covered Queries Button Clicked](#event--CreateIndexCoveredQueriesButtonClicked)
166166
- [Covered Queries Learn More Clicked](#event--CreateIndexCoveredQueriesLearnMoreClicked)
167+
- [ESR Learn More Clicked](#event--CreateIndexESRLearnMoreClicked)
167168
- [Start with an Index Tab Clicked](#event--CreateIndexIndexTabClicked)
168169
- [Cancel Button Clicked](#event--CreateIndexModalCancelled)
169170
- [Create Index Modal Closed](#event--CreateIndexModalClosed)
@@ -1906,6 +1907,15 @@ a system that doesn't offer a suitable secret storage backend.
19061907
- **context** (required): `"Create Index Modal"`
19071908
- **is_compass_web** (optional): `true | undefined`
19081909

1910+
<a name="event--CreateIndexESRLearnMoreClicked"></a>
1911+
1912+
### ESR Learn More Clicked
1913+
1914+
**Properties**:
1915+
1916+
- **context** (required): `"Create Index Modal"`
1917+
- **is_compass_web** (optional): `true | undefined`
1918+
19091919
<a name="event--CreateIndexIndexTabClicked"></a>
19101920

19111921
### Start with an Index Tab Clicked

0 commit comments

Comments
 (0)