Replies: 1 comment
-
For anyone having the same issue: this worked for me, apparently the order in which the ignores object is matters (it has to be first on the array):
Now i'm having another issue which is that my specified rules aren't being applied. I think it might be ignoring the second positioned object... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI! When using ESLint in Flat Config mode, I've encountered an issue where files specified in the ignores array are still being parsed. Here’s a detailed explanation:
Flat Config and Ignored Files:
In ESLint Flat Config, files to be ignored must be specified in a dedicated configuration object with an ignores property.
However, when combining the ignores property into the same object as the main configuration (e.g., rules or other settings), ESLint doesn’t properly skip the files—it only ignores them for the applied rules.
Using @antfu/eslint-config:
I attempted to integrate the ignores property alongside the configuration provided by @antfu/eslint-config, but files in the ignored paths (e.g., node_modules, dist, .quasar) are still being parsed.
Separating the ignores into a standalone object works in theory but doesn’t function as expected when combined with Antfu’s Flat Config Composer.
This is my environment:
ESLint Version: Latest (9.17.0 at the time of writing)
@antfu/eslint-config Version: Latest
Project Setup: Flat Config (eslint.config.js)
I first tried this but it does not properly ignore the files:
Also tried this but still doesn’t work as expected. ESLint throws errors related to Antfu’s FlatConfigComposer integration or the configuration is not applied correctly.:
Any ideas on how to get this working? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions