Closed jaroslav-kubicek closed 4 years ago
ESLint already supports per-directory overrides:
// .eslintrc.js
module.exports = {
...
overrides: [
{
files: ['__generated__/**/*.js'],
rules: {
'eslint-comments/no-unlimited-disable': 'off'
}
},
]
}
Or equivalently, you could add an .eslintrc.js inside the __generated__
folder to turn off the rule.
Alright, perfect! I haven't noticed, TIL 💯
Hello! 👋
Thanks for this awesome plugin. We use most of the rules except
no-unlimited-disable
- we had to disable it as our application contains autogenerated javascript files - this is relevant mostly to all apps which use relay client for GraphQL server - see example here of such file: https://github.com/adeira/relay-example/blob/master/src/LocalForm/__generated__/LocalFormQuery.graphql.js#L6For that reason, I got an idea we could still turn on
no-unlimited-disable
while excluding these autogenerated files, what do you think?