We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please describe what the rule should do:
Require that all type declarations appear at the top of the file, first thing after any import declarations.
type
What category of rule is this? (place an "X" next to just one item)
[x] Enforces code style [ ] Warns about a potential error [ ] Suggests an alternate way of doing something [ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
Good:
import createAsyncTracker from '../createAsyncTracker'; import type { AdType } from '../types'; type Unit = {| prefix: string, ignoreSuffix?: Array<string>, size: string, id: string, max?: number |};
Bad:
import createAsyncTracker from '../createAsyncTracker'; import type { AdType } from '../types'; const foo = 'bar'; type Unit = {| prefix: string, ignoreSuffix?: Array<string>, size: string, id: string, max?: number |};
The text was updated successfully, but these errors were encountered:
@danharper Might be a good idea to create an issue template, like ESLint does:
Do you want me to create one?
Is the above information sufficient? (This issue)
Sorry, something went wrong.
👍 on an issue template
feat: add require-types-at-top rule (closes #319, #168, #285)
74bcb8c
No branches or pull requests
Please describe what the rule should do:
Require that all
type
declarations appear at the top of the file, first thing after any import declarations.What category of rule is this? (place an "X" next to just one item)
[x] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
Good:
Bad:
The text was updated successfully, but these errors were encountered: