Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadhg McDonald-Jensen committed Sep 21, 2020
1 parent db1f57a commit 81ca186
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions docs/getting-started/linting/FAQ.md
Expand Up @@ -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"
}
]
}
}
```

<br />
<br />
<br />
Expand Down
@@ -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.

Expand Down

0 comments on commit 81ca186

Please sign in to comment.