This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 887
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:palantir/tslint into next
# Conflicts: # CHANGELOG.md # package.json # src/linter.ts
- Loading branch information
Showing
174 changed files
with
3,335 additions
and
699 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
formatterName: codeFrame | ||
description: Framed formatter which creates a frame of error code. | ||
descriptionDetails: |- | ||
|
||
Prints syntax highlighted code in a frame with a pointer to where | ||
exactly lint error is happening. | ||
sample: |- | ||
|
||
src/components/Payment.tsx | ||
Parentheses are required around the parameters of an arrow function definition (arrow-parens) | ||
21 | public componentDidMount() { | ||
22 | this.input.focus(); | ||
> 23 | loadStripe().then(Stripe => Stripe.pay()); | ||
| ^ | ||
24 | } | ||
25 | | ||
26 | public render() { | ||
consumer: human | ||
layout: formatter | ||
title: 'Formatter: codeFrame' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
ruleName: import-blacklist | ||
description: |- | ||
|
||
Disallows importing the specified modules directly via `import` and `require`. | ||
Instead only sub modules may be imported from that module. | ||
rationale: |- | ||
|
||
Some libraries allow importing their submodules instead of the entire module. | ||
This is good practise as it avoids loading unused modules. | ||
optionsDescription: A list of blacklisted modules. | ||
options: | ||
type: array | ||
items: | ||
type: string | ||
minLength: 1 | ||
optionExamples: | ||
- 'true' | ||
- '[true, "rxjs", "lodash"]' | ||
type: functionality | ||
typescriptOnly: false | ||
layout: rule | ||
title: 'Rule: import-blacklist' | ||
optionsJSON: |- | ||
{ | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minLength": 1 | ||
} | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
ruleName: no-empty-interface | ||
description: Forbids empty interfaces. | ||
rationale: 'An empty interface is equivalent to its supertype (or `{}`).' | ||
optionsDescription: Not configurable. | ||
options: null | ||
optionExamples: | ||
- 'true' | ||
type: typescript | ||
typescriptOnly: true | ||
layout: rule | ||
title: 'Rule: no-empty-interface' | ||
optionsJSON: 'null' | ||
--- |
Oops, something went wrong.