mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-01 06:10:16 +08:00
chore: upgrade oxlint to v0.13.2 (#8891)
Co-authored-by: LongYinan <lynweklm@gmail.com>
This commit is contained in:
@@ -285,6 +285,7 @@ const RandomBars = ({ count, header }: { count: number; header?: boolean }) => {
|
||||
/>
|
||||
) : null}
|
||||
{Array.from({ length: count }).map((_, index) => (
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
<RandomBar key={index} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
} from '../services/app-tabs-header-service';
|
||||
import * as styles from './styles.css';
|
||||
|
||||
const TabSupportType = ['collection', 'tag', 'doc'];
|
||||
const TabSupportType = new Set(['collection', 'tag', 'doc']);
|
||||
|
||||
const tabCanDrop =
|
||||
(tab?: TabStatus): NonNullable<DropTargetOptions<AffineDNDData>['canDrop']> =>
|
||||
@@ -53,7 +53,7 @@ const tabCanDrop =
|
||||
|
||||
if (
|
||||
ctx.source.data.entity?.type &&
|
||||
TabSupportType.includes(ctx.source.data.entity?.type)
|
||||
TabSupportType.has(ctx.source.data.entity?.type)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -383,12 +383,12 @@ export const ExplorerTreeNode = ({
|
||||
e.preventDefault();
|
||||
}}
|
||||
>
|
||||
{inlineOperations.map(({ view }, index) => (
|
||||
{inlineOperations.map(({ view, index }) => (
|
||||
<Fragment key={index}>{view}</Fragment>
|
||||
))}
|
||||
{menuOperations.length > 0 && (
|
||||
<Menu
|
||||
items={menuOperations.map(({ view }, index) => (
|
||||
items={menuOperations.map(({ view, index }) => (
|
||||
<Fragment key={index}>{view}</Fragment>
|
||||
))}
|
||||
>
|
||||
|
||||
@@ -314,9 +314,9 @@ const CMDKKeyBinding = ({ keyBinding }: { keyBinding: string }) => {
|
||||
|
||||
return (
|
||||
<div className={styles.keybinding}>
|
||||
{fragments.map((fragment, index) => {
|
||||
{fragments.map(fragment => {
|
||||
return (
|
||||
<div key={index} className={styles.keybindingFragment}>
|
||||
<div key={fragment} className={styles.keybindingFragment}>
|
||||
{fragment}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -30,11 +30,11 @@ export const HighlightText = ({ text = '', end, start }: HighlightProps) => {
|
||||
|
||||
return (
|
||||
<span className={styles.highlightText}>
|
||||
{parts.map((part, i) =>
|
||||
{parts.map(part =>
|
||||
typeof part === 'string' ? (
|
||||
<Fragment key={i}>{part}</Fragment>
|
||||
<Fragment key={part}>{part}</Fragment>
|
||||
) : (
|
||||
<span key={i} className={styles.highlightKeyword}>
|
||||
<span key={part.h} className={styles.highlightKeyword}>
|
||||
{part.h}
|
||||
</span>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user