eslint-plugin-graphql icon indicating copy to clipboard operation
eslint-plugin-graphql copied to clipboard

New config option `withoutValidators`

Open nodkz opened this issue 7 years ago • 6 comments

I want to use all current list of validators for Relay, except NoUnusedVariables validator.

For now, I can describe all validators explicitly but may lose some new validators in future. Guys, what do you think about new option withoutValidators?

nodkz avatar Jan 08 '18 15:01 nodkz

i have to think more carefully about how to weigh the difference between the existing concept of an "environment" (which maps to a subset of all GraphQL validators) vs being able to control the individual validators themselves.

as you've mentioned, perhaps this looks like combining the validators set by the environment, and adding and subtracting them based on an includes/excludes validators and utilizing the result

jnwng avatar May 23 '19 20:05 jnwng

Would find this feature useful. excludeValidators strikes me as a somewhat more intuitive name.

ghost avatar Aug 28 '19 21:08 ghost

I'd really love this feature too! Is there any workaround at the moment other than explicitly defining all validators except the few I want to exclude?

Nnoerregaard avatar Jan 22 '20 13:01 Nnoerregaard

Would be very useful feature! Any updates?

Abuzhan avatar Jul 28 '20 11:07 Abuzhan

This would be an awesome feature!

t-heuser avatar Mar 17 '21 14:03 t-heuser

Yes. This would be a nice feature to have. However I would suggest something like this,

{
   "validators": {
        "NoUnusedFragments": false,
        "NoUnusedVariables": { "enabled": true, ...someConfigs },
   }
}

binishkaspar avatar May 18 '21 10:05 binishkaspar