Skip to content

Commit cab6807

Browse files
chore(deps): update eslint (#6957)
* chore(deps): update eslint * chore(components): fix new eslint errors --------- Co-authored-by: mongodb-devtools-bot[bot] <189715634+mongodb-devtools-bot[bot]@users.noreply.github.com> Co-authored-by: Sergey Petushkov <[email protected]>
1 parent 89bae2d commit cab6807

File tree

7 files changed

+171
-190
lines changed

7 files changed

+171
-190
lines changed

configs/eslint-config-compass/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
"@babel/eslint-parser": "^7.14.3",
1919
"@mongodb-js/eslint-config-devtools": "^0.9.9",
2020
"@mongodb-js/eslint-plugin-compass": "^1.2.9",
21-
"@typescript-eslint/eslint-plugin": "^8.34.0",
22-
"@typescript-eslint/parser": "^8.34.0",
21+
"@typescript-eslint/eslint-plugin": "^8.35.1",
22+
"@typescript-eslint/parser": "^8.35.1",
2323
"eslint": "^8.57.1",
2424
"eslint-config-prettier": "^8.3.0",
2525
"eslint-plugin-chai-friendly": "^1.1.0",
2626
"eslint-plugin-filename-rules": "^1.2.0",
2727
"eslint-plugin-jsx-a11y": "^6.10.2",
2828
"eslint-plugin-mocha": "^8.0.0",
2929
"eslint-plugin-react": "^7.37.5",
30-
"eslint-plugin-react-hooks": "^4.6.2"
30+
"eslint-plugin-react-hooks": "^5.2.0"
3131
},
3232
"scripts": {
3333
"prettier": "prettier-compass",

package-lock.json

Lines changed: 155 additions & 174 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
"cheerio": "1.0.0-rc.10"
105105
},
106106
"@mongodb-js/eslint-config-devtools": {
107-
"@typescript-eslint/eslint-plugin": "^8.34.0",
108-
"@typescript-eslint/parser": "^8.34.0",
107+
"@typescript-eslint/eslint-plugin": "^8.35.1",
108+
"@typescript-eslint/parser": "^8.35.1",
109109
"eslint": "^8.57.1",
110110
"eslint-plugin-jsx-a11y": "^6.10.2",
111111
"eslint-plugin-react": "^7.37.5",
112-
"eslint-plugin-react-hooks": "^4.6.2"
112+
"eslint-plugin-react-hooks": "^5.2.0"
113113
}
114114
}
115115
}

packages/compass-collection/src/plugin-tab-title.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type PluginTitleProps = {
2222
} & WorkspaceTabCoreProps &
2323
WorkspacePluginProps<typeof CollectionWorkspaceTitle>;
2424

25-
function _PluginTitle({
25+
function PluginTitle({
2626
editViewName,
2727
isNonExistent,
2828
isReadonly,
@@ -84,4 +84,4 @@ export const CollectionPluginTitleComponent = connect(
8484
isReadonly: state.metadata?.isReadonly,
8585
sourceName: state.metadata?.sourceName,
8686
})
87-
)(_PluginTitle);
87+
)(PluginTitle);

packages/compass-components/src/components/leafygreen.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ import { Tabs, Tab } from '@leafygreen-ui/tabs';
7070
import TextArea from '@leafygreen-ui/text-area';
7171
import LeafyGreenTextInput from '@leafygreen-ui/text-input';
7272
import { SearchInput } from '@leafygreen-ui/search-input';
73-
export type { ToastProps } from '@leafygreen-ui/toast';
74-
export { ToastProvider, useToast } from '@leafygreen-ui/toast';
7573
export { usePrevious, useMergeRefs } from '@leafygreen-ui/hooks';
7674
import Toggle from '@leafygreen-ui/toggle';
7775
import Tooltip from '@leafygreen-ui/tooltip';

packages/compass-components/src/hooks/use-confirmation.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ const hideButtonStyles = css({
101101
display: 'none !important',
102102
});
103103

104-
const _ConfirmationModalArea: React.FunctionComponent = ({ children }) => {
104+
const ConfirmationModalStateHandler: React.FunctionComponent = ({
105+
children,
106+
}) => {
105107
const [confirmationProps, setConfirmationProps] = useState<
106108
Partial<ConfirmationProperties> & { open: boolean; confirmationId: number }
107109
>({
@@ -205,7 +207,7 @@ export const ConfirmationModalArea: React.FunctionComponent = ({
205207

206208
return (
207209
<ConfirmationModalAreaMountedContext.Provider value={true}>
208-
<_ConfirmationModalArea>{children}</_ConfirmationModalArea>
210+
<ConfirmationModalStateHandler>{children}</ConfirmationModalStateHandler>
209211
</ConfirmationModalAreaMountedContext.Provider>
210212
);
211213
};

packages/compass-components/src/hooks/use-toast.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { useContext, useEffect, useMemo, useRef } from 'react';
2-
import type { ToastProps } from '../components/leafygreen';
2+
import type { ToastProps } from '@leafygreen-ui/toast';
33
import {
44
ToastProvider,
55
useToast as useLeafygreenToast,
6-
} from '../components/leafygreen';
6+
} from '@leafygreen-ui/toast';
77
import { useStackedComponent } from './use-stacked-component';
88
import { css } from '..';
99

@@ -150,7 +150,7 @@ export const openToast = toastState.openToast.bind(toastState);
150150
*/
151151
export const closeToast = toastState.closeToast.bind(toastState);
152152

153-
const _ToastArea: React.FunctionComponent = ({ children }) => {
153+
const ToastStateHandler: React.FunctionComponent = ({ children }) => {
154154
// NB: the way leafygreen implements this hook leads to anything specifying
155155
// toast methods in hooks dependencies to constantly update potentially
156156
// causing infinite loops of toasts. To work around that we are storing toast
@@ -207,7 +207,7 @@ export const ToastArea: React.FunctionComponent = ({ children }) => {
207207
return (
208208
<ToastAreaMountedContext.Provider value={true}>
209209
<ToastProvider portalClassName={stackedElemStyles}>
210-
<_ToastArea>{children}</_ToastArea>
210+
<ToastStateHandler>{children}</ToastStateHandler>
211211
</ToastProvider>
212212
</ToastAreaMountedContext.Provider>
213213
);

0 commit comments

Comments
 (0)