-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Flow generics trigger no-shadow rule #275
Comments
I have a similar error. For the following code // @flow strict
import React, { type Element } from 'react';
/** Just a test component */
const YourComponent = (): Element<'div'> => (
<div>
<span>test</span>
</div>
);
export default YourComponent; I get the error:
Which is possibly a regression of babel/babel-eslint#223 |
If I import the type import type { Element } from 'react'; as described in Flow's docs, I get same lint error. But if I use the namespace import I get no error: // @flow strict
import * as React from 'react';
/** Just a test component */
const YourComponent = (): React.Element<'div'> => (
<div>
<span>test</span>
</div>
);
export default YourComponent; And if I use the utility "internal" type notation I also get no error: // @flow strict
import React from 'react';
/** Just a test component */
const YourComponent = (): React$Element<'div'> => (
<div>
<span>test</span>
</div>
);
export default YourComponent; |
This sure seems like a bug in the parsing phase ... const x = {
getDefaults<StateShape>(...args) { /* ... */ }
} the |
same issue here
someKey is declared in upperscope |
Declarations like:
are marked by the linter as
'T' is already declared in the upper scope. (no-shadow)
Versions:
The text was updated successfully, but these errors were encountered: