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:
Louis Knight-Webb
2025-11-18 16:45:10 +00:00
committed by GitHub
parent 18ae6c5fd6
commit 0bd36a3b3a
6 changed files with 35 additions and 7 deletions

View File

@@ -11,17 +11,19 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:i18next/recommended',
'plugin:eslint-comments/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', '@typescript-eslint', 'unused-imports', 'i18next'],
plugins: ['react-refresh', '@typescript-eslint', 'unused-imports', 'i18next', 'eslint-comments'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
rules: {
'eslint-comments/no-use': ['error', { allow: [] }],
'react-refresh/only-export-components': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [

View File

@@ -96,6 +96,7 @@
"autoprefixer": "^10.4.16",
"eslint": "^8.55.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-i18next": "^6.1.3",
"eslint-plugin-prettier": "^5.5.0",
"eslint-plugin-react-hooks": "^4.6.0",

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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(() => {