chore: fixed linters

This commit is contained in:
Jannat Patel
2024-08-12 20:13:57 +05:30
parent cf2c2345c3
commit 3e82608d5f

View File

@@ -485,17 +485,17 @@ export function getLineStartPosition(string, position) {
} }
export function singularize(word) { export function singularize(word) {
const endings = { const endings = {
ves: 'fe', ves: 'fe',
ies: 'y', ies: 'y',
i: 'us', i: 'us',
zes: 'ze', zes: 'ze',
ses: 's', ses: 's',
es: 'e', es: 'e',
s: '' s: '',
}; }
return word.replace( return word.replace(
new RegExp(`(${Object.keys(endings).join('|')})$`), new RegExp(`(${Object.keys(endings).join('|')})$`),
r => endings[r] (r) => endings[r]
); )
} }