-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: false positives for typescript type + value export #1319
Conversation
This seems like it might overlap with #923? |
@ljharb to prevent double commenting - #1318 (comment) |
src/rules/export.js
Outdated
if ([ | ||
'TSTypeAliasDeclaration', | ||
'TSInterfaceDeclaration', | ||
].includes(node.declaration.type)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
includes
isn't available on node 4; we'll need to add the array-includes
package here.
tests/src/rules/export.js
Outdated
export const Foo = 1; | ||
export type Foo = number; | ||
`, | ||
...parserConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, object spread isn't on node < 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and fixed.
Fixes #1318