diff --git a/docs/src/rules/valid-typeof.md b/docs/src/rules/valid-typeof.md index 5269cfddba7..4c01f582920 100644 --- a/docs/src/rules/valid-typeof.md +++ b/docs/src/rules/valid-typeof.md @@ -15,12 +15,6 @@ For a vast majority of use cases, the result of the `typeof` operator is one of This rule enforces comparing `typeof` expressions to valid string literals. -## Options - -This rule has an object option: - -* `"requireStringLiterals": true` requires `typeof` expressions to only be compared to string literals or other `typeof` expressions, and disallows comparisons to any other value. - Examples of **incorrect** code for this rule: ::: incorrect @@ -51,6 +45,14 @@ typeof bar === typeof qux ::: +## Options + +This rule has an object option: + +* `"requireStringLiterals": true` allows the comparison of `typeof` expressions with only string literals or other `typeof` expressions, and disallows comparisons to any other value. Default is `false`. + +### requireStringLiterals + Examples of **incorrect** code with the `{ "requireStringLiterals": true }` option: ::: incorrect