eslint-plugin

@masknet/prefer-default-export

Enforce default export location at top or bottom

Rule Details

Options

/**
 * @minItems Infinity
 */
export type Options = ['at-top' | 'at-bottom']

:x: Incorrect

/* eslint @masknet/prefer-default-export: 'at-top' */
export const foo = ''
export default {}
export const bar = ''

:white_check_mark: Correct

/* eslint @masknet/prefer-default-export: 'at-top' */
export default {}
export const foo = ''
export const bar = ''

Attributes