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 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix for #4530 * optimization + new test cases * make fix more uniform * use .pos instead of .getStart * Revert "use .pos instead of .getStart" This reverts commit 72885ee. * don't overlap fixes
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
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,30 @@ | ||
let a: never = () => throw new Error('bla'); | ||
|
||
let b: never = () => throw new Error('bla'); | ||
|
||
let c: never = () => throw new Error('string1' + 'string2' + 'string3'); | ||
|
||
let d: never = () => throw new Error('string' + 1); | ||
|
||
let e: never = () => throw new Error('string1' + 1 + {}); | ||
|
||
let f: never = () => throw new Error(('string')); | ||
|
||
let g: never = () => throw new Error(1 + 2 + ('string')); | ||
|
||
// no warning because rule does not check for toString() | ||
const one = 1; | ||
let h: never = () => throw one.toString(); | ||
|
||
let i: never = () => throw new Error(`some template string`); | ||
|
||
const someVariable = 123; | ||
let j: never = () => throw new Error(`template with ${someVariable} string`); | ||
|
||
throw new Error(('component requires CSS height property')); | ||
|
||
throw new Error('component...') | ||
|
||
throw new Error((('component...'))) | ||
|
||
throw/**/new Error('component') |
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