-
-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Labels
Description
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:
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
|};