diff --git a/docs/getting-started/linting/FAQ.md b/docs/getting-started/linting/FAQ.md index e7cb79a8270..4a9175c3745 100644 --- a/docs/getting-started/linting/FAQ.md +++ b/docs/getting-started/linting/FAQ.md @@ -154,6 +154,22 @@ For example, you can ban enums (or some variation of) using one of the following } ``` +Or if you want to enforce that all [tuples have labels](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements) you could do this: + +```jsonc +{ + "rules": { + "no-restricted-syntax": [ + "warn", + { + "selector": "TSTupleType > :not(TSNamedTupleMember)", + "message": "all tuples should have labels" + } + ] + } +} +``` +


diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index f33a8d5b79d..d9d8d89f35f 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -1,4 +1,4 @@ -# Require explicit return and argument types on exported functions' and classes' public class methods (`explicit-module-boundary-types`) +# Require explicit return and argument types on exported functions' and classes' public and protected class methods (`explicit-module-boundary-types`) Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output.