eslint-plugin-perfectionist
Version:
ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
12 lines (11 loc) • 361 B
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
let validateCustomSortConfiguration = ({ alphabet, type }) => {
if (type !== 'custom') {
return
}
if (alphabet.length === 0) {
throw new Error('`alphabet` option must not be empty')
}
}
exports.validateCustomSortConfiguration = validateCustomSortConfiguration