Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
12joan committed Dec 21, 2023
1 parent 45d7190 commit aa71b8d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function PlaygroundTurnIntoDropdownMenu(props: DropdownMenuProps) {
const editor = useEditorRef();
const openState = useOpenState();

// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
const value: string = useEditorSelector((editor) => {
if (!isSelectionExpanded(editor)) {
const entry = findNode<TElement>(editor!, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { ToolbarButton } from './toolbar';
export function TableDropdownMenu(props: DropdownMenuProps) {
const editor = useEditorRef();

// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
const tableSelected = useEditorSelector((editor) =>
someNode(editor, { match: { type: ELEMENT_TABLE } }),
[]
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/registry/default/plate-ui/table-element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const TableFloatingToolbar = React.forwardRef<
const selected = useSelected();
const editor = useEditorRef();

// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
const selectionCollapsed = useEditorSelector((editor) => !isSelectionExpanded(editor), []);
const collapsed = !readOnly && selected && selectionCollapsed;
const open = !readOnly && selected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function TurnIntoDropdownMenu(props: DropdownMenuProps) {
const editor = useEditorRef();
const openState = useOpenState();

// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
const value: string = useEditorSelector((editor) => {
if (isCollapsed(editor.selection)) {
const entry = findNode<TElement>(editor, {
Expand Down
4 changes: 2 additions & 2 deletions packages/font/src/hooks/useColorDropdownMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export const useColorDropdownMenuState = ({
const editor = useEditorRef();

const selectionDefined = useEditorSelector(
// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
(editor) => !!editor.selection,
[]
);

const color = useEditorSelector(
// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
(editor) => getMark(editor, nodeType) as string,
[nodeType]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useLineHeightDropdownMenuState = () => {
const { validNodeValues: values = [], defaultNodeValue } =
getPluginInjectProps(editor, KEY_LINE_HEIGHT);

// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
const value: string | undefined = useEditorSelector((editor) => {
if (isCollapsed(editor.selection)) {
const entry = getBlockAbove<TElement>(editor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const useTableBordersDropdownMenuContentState = () => {
hasTopBorder,
hasLeftBorder,
hasRightBorder,
// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
} = useEditorSelector((editor) => ({
hasBottomBorder: !isTableBorderHidden(editor, 'bottom'),
hasTopBorder: !isTableBorderHidden(editor, 'top'),
Expand Down

0 comments on commit aa71b8d

Please sign in to comment.