Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

valid-typeof

- Enforce comparing typeof expressions against valid strings

Recommended

This rule enforces comparing typeof expressions to valid string literals.

What ESLint should do when it catches the rule break

Show a warning

Options

requireStringLiterals

Requires typeof expressions to only be compared to string literals or other typeof expressions, and disallows comparisons to any other value.

Rule examples

You can check them out here.