Skip to content

Exclude .storybook from ESLint's default hidden directory ignore list via .eslintignore to allow linting of Storybook configuration files#7898

Merged
wesleybl merged 6 commits intoplone:mainfrom
Shyam-Raghuwanshi:fix/lint-staged-hidden-directories-7894
Feb 20, 2026
Merged

Exclude .storybook from ESLint's default hidden directory ignore list via .eslintignore to allow linting of Storybook configuration files#7898
wesleybl merged 6 commits intoplone:mainfrom
Shyam-Raghuwanshi:fix/lint-staged-hidden-directories-7894

Conversation

@Shyam-Raghuwanshi
Copy link
Contributor

@Shyam-Raghuwanshi Shyam-Raghuwanshi commented Feb 13, 2026

Filter out ESLint-ignored files (e.g., files in hidden directories
like .storybook) before passing them to ESLint in the volto package
lint-staged configuration.

This prevents pre-commit hook failures when staging files from hidden
directories, as ESLint ignores these files by default and the
'--max-warnings=0' flag treats the warning as a fatal error.


Closes #7894


@davisagli davisagli requested a review from wesleybl February 18, 2026 05:58
Copy link
Member

@wesleybl wesleybl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shyam-Raghuwanshi I've thought about it some more and I think the files in .storybook should be analyzed. So I think the best solution here is to explicitly tell ESLint not to ignore the .storybook folder.

@wesleybl wesleybl changed the title fix: exclude hidden directories from ESLint in lint-staged Exclude .storybook from ESLint's default hidden directory ignore list via .eslintignore to allow linting of Storybook configuration files Feb 20, 2026
@wesleybl wesleybl merged commit 5b78a4c into plone:main Feb 20, 2026
47 checks passed
@wesleybl
Copy link
Member

@Shyam-Raghuwanshi Thanks!

Could you please do a backport to Volto 18?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lint-staged passes files from hidden directories to ESLint causing pre-commit failure

2 participants

Comments