All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
20 lines
439 B
JavaScript
20 lines
439 B
JavaScript
module.exports = checkListItemIndent
|
|
|
|
function checkListItemIndent(context) {
|
|
var style = context.options.listItemIndent || 'tab'
|
|
|
|
if (style === 1 || style === '1') {
|
|
return 'one'
|
|
}
|
|
|
|
if (style !== 'tab' && style !== 'one' && style !== 'mixed') {
|
|
throw new Error(
|
|
'Cannot serialize items with `' +
|
|
style +
|
|
'` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'
|
|
)
|
|
}
|
|
|
|
return style
|
|
}
|