Skip to content

Commit 8399918

Browse files
committed
chore: migrate to @nextcloud/eslint-config 9
Its ESLint 10 reads a flat config only, so .eslintrc.cjs becomes eslint.config.js, whose rules apply to the app sources, leaving the exemptions version 9 grants test files in place. The lint workflow watched .eslintrc.* and .eslintignore, neither of which exists any more, and webpack.js was the last place configuring ESLint the old way: nothing declares its dependencies, so it could not run at all. The import rules are gone from the shared config, so 'import/extensions' goes with them, as do the babel parser options and the appVersion global the sources do not use, which the shared config declares anyway. 'no-console' was built into the old config and is now spelled out. The sources follow what the new rules ask for: sorted imports, blank lines between multi line component options, and camel cased attributes and events in templates. Unused callback parameters are gone, one rule asks for the ellipsis character in a translatable string, so 'Loading...' became 'Loading…', and the dashboard component is called GithubDashboard, because a name of one word can collide with an HTML element. Two findings needed a decision. NcPopover was given focusTrap, which @nextcloud/vue 9 does not declare any more, so asking for the focus trap to be off did nothing and the popover kept building a trap it does not need. The .native modifier of three mouse listeners is one the Vue 3 compiler drops while keeping the listener, so removing it changes nothing; that holds for these three, not for key events, where the modifier is compiled as a key name and swallows the handler. Folding a comment and the popover of a comment author had no test, and now have one. eslint.config.js has no place in the released archive, and the .eslintrc.js the packaging lists named never existed here. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com> The widget passed its label to the dashboard component as 'showMoreText'. The prop is called showMoreLabel, so the link under a full widget read 'More items …' instead of what the widget asked for. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com> The lint scripts passed --ext, which ESLint 10 ignores, and the change filter of the build did not watch the config file the build now reads. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com> The link under a full widget had no test, and now has one. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
1 parent 5416c02 commit 8399918

33 files changed

Lines changed: 1349 additions & 3319 deletions

‎.eslintrc.cjs‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎.github/workflows/lint-eslint.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ jobs:
3737
- 'package.json'
3838
- 'package-lock.json'
3939
- 'tsconfig.json'
40-
- '.eslintrc.*'
41-
- '.eslintignore'
40+
- 'eslint.config.*'
4241
- '**.js'
4342
- '**.ts'
4443
- '**.vue'

‎.github/workflows/node.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- 'package.json'
4141
- 'package-lock.json'
4242
- 'tsconfig.json'
43+
- 'eslint.config.js'
4344
- '**.js'
4445
- '**.ts'
4546
- '**.vue'

‎.nextcloudignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.vscode
99
.php-cs-fixer.*
1010
/.codecov.yml
11-
/.eslintrc.js
11+
/eslint.config.js
1212
/.gitattributes
1313
/.gitignore
1414
/.l10nignore

‎eslint.config.js‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
import { recommendedJavascript } from '@nextcloud/eslint-config'
7+
8+
export default [
9+
...recommendedJavascript,
10+
{
11+
name: 'integration_github/rules',
12+
files: ['src/**/*.js', 'src/**/*.vue'],
13+
rules: {
14+
'jsdoc/require-jsdoc': 'off',
15+
'jsdoc/tag-lines': 'off',
16+
'no-console': ['error', { allow: ['error', 'warn', 'info', 'debug'] }],
17+
'vue/first-attribute-linebreak': 'off',
18+
},
19+
},
20+
]

‎makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ appstore: clean
8484
--exclude=translationfiles \
8585
--exclude=webpack.* \
8686
--exclude=stylelint.config.js \
87-
--exclude=.eslintrc.js \
87+
--exclude=eslint.config.js \
8888
--exclude=.github \
8989
--exclude=.gitlab-ci.yml \
9090
--exclude=crowdin.yml \

0 commit comments

Comments
 (0)