Mikalai
Mikalai

Reputation: 1525

Eslint: disable operator `in`

Is there any way to tell eslint that using operator in is not allowed?

I mean:

console.log(1 in [1]);

Upvotes: 2

Views: 366

Answers (1)

superfly
superfly

Reputation: 722

disallow specified syntax (no-restricted-syntax)

For instance, you might decide to disallow the use of try-catch or class, or you might decide to disallow the use of the in operator.

http://eslint.org/docs/rules/no-restricted-syntax

Upvotes: 3

Related Questions