-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix]
prefer-default-export
: handle empty array destructuring
Fixes #1965
- Loading branch information
Showing
3 changed files
with
10 additions
and
2 deletions.
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
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 |
---|---|---|
|
@@ -88,6 +88,12 @@ ruleTester.run('prefer-default-export', rule, { | |
parser: require.resolve('babel-eslint'), | ||
}), | ||
// ...SYNTAX_CASES, | ||
{ | ||
code: ` | ||
export const [CounterProvider,, withCounter] = func();; | ||
`, | ||
parser: require.resolve('babel-eslint'), | ||
}, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ljharb
Author
Member
|
||
], | ||
invalid: [ | ||
test({ | ||
|
isn't there a
test(…)
missing for this case?