I am currently developing a component library in React within a mono-repository. I have the lint-staged package to run my linting and unit testing NPM scripts when I make a commit to the repository.
I'm currently experiencing a warning "File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override" for .storybook/main.js.
I have tried adding !./storybook/* to my .eslintignore file but I'm now out of ideas.
If I run yarn lint from the command line then I do not see the same error so it seems something very specific to lint-staged. Any ideas?
In your
eslintconfiguration add anignorePatternskey.For instance add this to your
.eslintrc.json: