signal-desktop/build/intl-linter/rules/noOneChoice.ts
2023-06-13 12:08:18 -07:00

17 lines
409 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule';
export default rule('noOneChoice', context => {
return {
enterPlural(element) {
if (Object.keys(element.options).length < 2) {
context.report(
'{plural} requires multiple options for Smartling',
element.location
);
}
},
};
});