Hello,

I am thinking there must be a way to do what this, but I can't seem to find 
it in the documentation ... but is there a way to mute/ignore a single 
instance of a rule through a comment?

For example, say I have the below:

if (someThing) {
    // Need to evaluate the value for some arbitrary reason
    value = eval(value);
} else {
    // Something else happens
}

Then the eval rule will yell at me. But in this instance I know I need it 
and I'd prefer not to see this warning anymore. From the docs it seems I 
could do something like the following:

if (someThing) {
    // Need to evaluate the value for some arbitrary reason
    /*eslint-disable no-eval*/
    value = eval(value);
    /*eslint-enable */
} else {
    // Something else happens
}

Which definitely makes sense for a block of code, but for a single line it 
seems like a lot of markup, what I'm looking for is something more like:

if (someThing) {
    // Need to evaluate the value for some arbitrary reason
    value = eval(value);  /*eslint-ignore no-eval*/
} else {
    // Something else happens
}

Does something like this exist?

Thanks,
Billy Matthews

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to