How to exclude file from linting? #413
Unanswered
AloisSeckar
asked this question in
Q&A
Replies: 1 comment
-
I also had problems with ignoring. I have a separate package with separate eslint configs. export const companyIgnores = {
// NOTE: no "name" else, it wouldn't work; maybe a bug in ESLint
ignores: ['**/node_modules', '**/public', '**/vendor', '**/dist', '**/.nuxt'],
};
export const configNuxt = [eslintPluginPrettierRecommended, companyEslintRules, companyIgnores]; This works for me. Could you try making entry an array? export default withNuxt([
{
ignores: ['**/_api.ts'],
},
// other config
]); You could also try to prepend the ignores befor the nuxt rules: export default withNuxt(
// ...Custom flat configs append after nuxt's configs
).prepend(
// ...Prepend some flat configs in front
) see https://eslint.nuxt.com/packages/module#config-customizations |
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
-
I have a file
/utils/_api.ts
auto-generated by OpenAPI containing TS types from backend. It doesn't fit ESLint rules, but since it is auto-generated, I just want to ignore it. However, I cannot figure out, how to make it work.Based on my older solution with
ignorePatterns
and after studing the flat config docs I belive, ineslint.config.mjs
I should have:but the file is still being checked and linting issues reported. What do I do wrong? Overriding
rules
section like this works good.Beta Was this translation helpful? Give feedback.
All reactions