-
I've been going insane trying to get this to work....seems like it should be obviously simple and common... I've converted a couple projects to the new config. I run eslint CLI from a root folder (where eslint.config.js resides) something like There's a folder off the project root called Does anyone have an example of the simplest eslint.config.js that ignores a folder called build? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Ok, obviously this works export default [
js.configs.recommended,
{
ignores: ['build/'],
},
]; Where it starts to fail is when I thought I was adding "global" language options export default [
js.configs.recommended,
{
ignores: ['build/'],
languageOptions: {
ecmaVersion: 2020,
sourceType: 'module', // module, script, commonjs
globals: {
...globals.es2020,
...globals.node,
...globals.shelljs,
},
},
},
]; ignores is ignored as soon as I add languageOptions there. Since my projects have Typescript as well always, I moved the language options to a Clearly I don't have a firm grasp on how this flat config works yet... |
Beta Was this translation helpful? Give feedback.
-
Well shoot...
RTFM for the 6th time and read ALL the sentences (and have a public discussion with yourself) to ensure success! |
Beta Was this translation helpful? Give feedback.
-
I've been bitten by this to. It took me some time to find this post. The current way is quite suboptimal. It would be easier to decouple meaning and semantics here:
|
Beta Was this translation helpful? Give feedback.
Well shoot...
If ignores is used without any other keys in the configuration object, then the patterns act as global ignores
Note that only global ignores patterns can match directories. ignores patterns that are specific to a configuration will only match file names
RTFM for the 6th time and read ALL the sentences (and have a public discussion with yourself) to ensure success!