From ed3641607c8386d629c3b86fb94120b26ad9d552 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 22 Jul 2024 11:54:27 +0200 Subject: [PATCH] Merge pull request #19522 from overleaf/jpa-sort-get-meta [web] sort getMeta type definitions and enforce sorting via eslint GitOrigin-RevId: 5b50c4f77facb3f92072597933bdc1c1bf0ecd78 --- services/web/.eslintrc.js | 10 ++++++++++ services/web/frontend/js/utils/meta.ts | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/services/web/.eslintrc.js b/services/web/.eslintrc.js index ffb26f5fd0..8faf58d9da 100644 --- a/services/web/.eslintrc.js +++ b/services/web/.eslintrc.js @@ -310,6 +310,16 @@ module.exports = { ], }, }, + { + // Sorting for Meta + files: ['frontend/js/utils/meta.ts'], + rules: { + '@typescript-eslint/member-ordering': [ + 'error', + { interfaces: { order: 'alphabetically' } }, + ], + }, + }, { // React component specific rules // diff --git a/services/web/frontend/js/utils/meta.ts b/services/web/frontend/js/utils/meta.ts index 188cc876de..b98a26a307 100644 --- a/services/web/frontend/js/utils/meta.ts +++ b/services/web/frontend/js/utils/meta.ts @@ -190,10 +190,10 @@ export interface Meta { 'ol-tags': Tag[] 'ol-teamInvites': TeamInvite[] 'ol-thirdPartyIds': ThirdPartyIds - 'ol-translationLoadErrorMessage': string 'ol-translationIoNotLoaded': string - 'ol-translationUnableToJoin': string + 'ol-translationLoadErrorMessage': string 'ol-translationMaintenance': string + 'ol-translationUnableToJoin': string 'ol-useShareJsHash': boolean 'ol-user': User 'ol-userAffiliations': Affiliation[]