Skip to content

Commit c922178

Browse files
authored
Merge pull request #1115 from nextcloud-libraries/chore/eslint-v9
chore: update ESLint to v9 and adjust code
2 parents e209b21 + c167dd9 commit c922178

9 files changed

Lines changed: 2699 additions & 3537 deletions

File tree

build/extract-l10n.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
import { GettextExtractor, JsExtractors } from 'gettext-extractor'
66

7-
const extractor = new GettextExtractor();
7+
const extractor = new GettextExtractor()
88

99
extractor
1010
.createJsParser([
@@ -15,7 +15,7 @@ extractor
1515
},
1616
}),
1717
])
18-
.parseFilesGlob('./lib/**/*.@(ts|js)');
18+
.parseFilesGlob('./lib/**/*.@(ts|js)')
1919

2020
extractor.savePotFile('./l10n/messages.pot')
2121

eslint.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*!
2+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: CC0-1.0
4+
*/
5+
6+
import { recommendedLibrary } from '@nextcloud/eslint-config'
7+
8+
export default [...recommendedLibrary]

l10n/messages.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ msgid ""
22
msgstr ""
33
"Content-Type: text/plain; charset=UTF-8\n"
44

5-
#: lib/index.ts:32
5+
#: lib/index.ts:33
66
msgid "seconds"
77
msgstr ""

lib/constants.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/**
1+
/*!
22
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: GPL-3.0-or-later
44
*/
5+
56
interface Translations {
67
locale: string
78
json: object

lib/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/**
1+
/*!
22
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: GPL-3.0-or-later
44
*/
5-
import moment from 'moment/min/moment-with-locales.js'
5+
66
import { getLocale } from '@nextcloud/l10n'
77
import { getGettextBuilder } from '@nextcloud/l10n/gettext'
8+
import moment from 'moment/min/moment-with-locales.js'
89

910
const locale = getLocale()
1011
const translations = LOCALES

0 commit comments

Comments
 (0)