disable eslint-disable comments (vibe-kanban) (#1321)
* Done! All eslint-disable comments are now banned and the codebase is clean. **Summary of changes:** 1. **Installed** `eslint-plugin-eslint-comments` 2. **Updated** [frontend/.eslintrc.cjs](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/2550-disable-eslint-d/frontend/.eslintrc.cjs) to enforce the ban 3. **Fixed 3 files** by refactoring code instead of suppressing rules: - [FeatureShowcaseModal.tsx](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/2550-disable-eslint-d/frontend/src/components/showcase/FeatureShowcaseModal.tsx): Added ref to track activeScopes snapshot - [ShareDialog.tsx](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/2550-disable-eslint-d/frontend/src/components/dialogs/tasks/ShareDialog.tsx): Added shareTask object to dependencies - [wysiwyg.tsx](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/2550-disable-eslint-d/frontend/src/components/ui/wysiwyg.tsx): Added didInit ref guard for run-once effect All checks pass ✓ * lint fix
This commit is contained in:
committed by
GitHub
parent
18ae6c5fd6
commit
0bd36a3b3a
@@ -39,8 +39,7 @@ const ShareDialogImpl = NiceModal.create<ShareDialogProps>(({ task }) => {
|
||||
useEffect(() => {
|
||||
shareTask.reset();
|
||||
setShareError(null);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [task.id, shareTask.reset]);
|
||||
}, [task.id, shareTask]);
|
||||
|
||||
const handleClose = () => {
|
||||
modal.resolve(shareTask.isSuccess);
|
||||
|
||||
@@ -193,13 +193,15 @@ function MarkdownDefaultValuePlugin({
|
||||
lastMdRef: React.MutableRefObject<string>;
|
||||
}) {
|
||||
const [editor] = useLexicalComposerContext();
|
||||
const didInit = useRef(false);
|
||||
useEffect(() => {
|
||||
// Apply once on mount
|
||||
if (didInit.current) return;
|
||||
didInit.current = true;
|
||||
|
||||
editor.update(() => {
|
||||
$convertFromMarkdownString(defaultValue || '', importTransformers);
|
||||
});
|
||||
lastMdRef.current = defaultValue || '';
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [editor]); // do not depend on defaultValue to ensure it's one-time
|
||||
}, [editor, defaultValue, importTransformers, lastMdRef]);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,10 @@ export function ProjectTasks() {
|
||||
|
||||
const isLoaded = !loading;
|
||||
const showcaseId = showcases.taskPanel.id;
|
||||
const seenFeatures = config?.showcases?.seen_features ?? [];
|
||||
const seenFeatures = useMemo(
|
||||
() => config?.showcases?.seen_features ?? [],
|
||||
[config?.showcases?.seen_features]
|
||||
);
|
||||
const seen = isLoaded && seenFeatures.includes(showcaseId);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user