fix(lint): enable ESLint v9 rules and fix existing lint issues - #8101
Merged
Conversation
Bumps [@nextcloud/eslint-config](https://github.com/nextcloud-libraries/eslint-config) from 8.4.2 to 9.0.1. - [Release notes](https://github.com/nextcloud-libraries/eslint-config/releases) - [Changelog](https://github.com/nextcloud-libraries/eslint-config/blob/main/CHANGELOG.md) - [Commits](nextcloud-libraries/eslint-config@v8.4.2...v9.0.1) --- updated-dependencies: - dependency-name: "@nextcloud/eslint-config" dependency-version: 9.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
https://eslint.org/docs/latest/use/configure/migration-guide#ignore-files Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Scope Vue overrides to *.vue, drop obsolete eslint-plugin-import rules, remove stale eslint-disable comments, and temporarily disable failing rules in libresign/disabled-during-migration (LibreSign#8051). Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Resolve package.json conflict by keeping ESLint v9 engines and @nextcloud/eslint-config while taking upstream vue-tsc bump. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The switch is already hidden when allowOverrideMutable is false, so vue-tsc flagged the inner comparison as impossible (TS2367). Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Vue coerces omitted boolean props to false, so removing default: true for vue/no-boolean-default broke default-true behavior. Use explicit default: undefined for those props instead. Also restore the policy precedence hint spacer without tripping vue/no-useless-mustaches or vue/html-self-closing. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Playwright requires `async ({}, use)` for fixtures without dependencies.
Reverting the no-empty-pattern workaround and disabling that rule for
playwright/**/*.ts instead.
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
lfals
marked this pull request as ready for review
August 28, 2026 18:47
This comment was marked as resolved.
This comment was marked as resolved.
Replace raw console calls with the @nextcloud/logger wrapper and scope no-console off for test files that intentionally intercept console output. Cherry-picked from masterlouis LibreSign#8067 (775cadb). Co-authored-by: Luigi <gigi.mastro.wolf@gmail.com> Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
vitormattos
requested changes
Aug 28, 2026
2 tasks
Replace empty catch blocks with .catch(() => null), drop the tests-console eslint override, and use file-local no-console disables for test harness files. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Avoid TypeError when test mocks return undefined instead of a promise. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
vitormattos
approved these changes
Aug 28, 2026
Member
|
/backport to stable35 |
|
The backport to # Switch to the target branch and update it
git checkout stable35
git pull origin stable35
# Create the new backport branch
git checkout -b backport/8101/stable35
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 7557c1ca c335dc16 2314c68d 09048d22 54eb70f8 139b376d 9436ed23 0c84f50c 99f461ea bb2975d5 518f8a55 ffbee5a5 defcdb74 1b472891 5b394397 cbd935a1 6ccbb9bd 8cada416 9b56b468 f935eda2 23a94d75 858bdbc4 0ea2072d eaffd72f 468e0823 4f52f6e1 f76a95ad dc09db52 d9d2de8c b7ea557c cb767dea a3285e8c 123f2b8b d4aaf0b0 197a6c8d d54a108c 1c35f6bd 3b25b1f5 44f36131 7bb48ba2 f310c81d 2d1ba826 49c26789 aee3f8c3 57fa095e d4c2bbb0 1a268773 6f637556 2a1d705f d9b4b3b4 0e4b4569
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/8101/stable35Error: Failed to push branch backport/8101/stable35: remote: Invalid username or token. Password authentication is not supported for Git operations. Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #8051
📝 Summary
Migrates LibreSign to
@nextcloud/eslint-configv9 / ESLint 10 (building on #7876) and enables as many new lint rules as reasonably possible without risky or oversized changes.This PR:
import { recommended } from '@nextcloud/eslint-config'eslint-plugin-importoverrides)libresign/disabled-during-migrationas the source of truth for deferred rules (Talk-style)fix(lint): enable <rule>), with manual review of autofixeseslint-disablecomments for rules that no longer existDeferred rules include large formatting/import-sorting churn, translation-sensitive l10n rules, Vue event/slot naming, JSDoc debt, and semantic cleanups that need focused follow-up PRs.
Incorporating #8067 (@masterlouis)
Reviewed the four commits from #8067 (
fix/lint-migration). Three were already covered by this branch (baseline flat config, obsoleteeslint-disablecleanup, and the temporarydisabled-during-migrationblock). The unique contribution —fix(lint): enable no-console— was cherry-picked as2a1d705ff:console.error/console.warnwith the existingsrc/logger.jswrapper (@nextcloud/logger) across app codeno-consolefrom the recommended configlibresign/tests-console-overridefor test files that intentionally interceptconsole.*(src/tests/setup.js,src/tests/store/filters.spec.ts)Co-authored-by: Luigi (@masterlouis) — thank you for the
no-console/ logger migration work in #8067. This PR supersedes #8067; that PR can be closed once this lands.🧪 How to test
npm cinpm run lint(should exit 0)npm run ts:checknpm testnpx vitest run src/tests/components/Request/RequestPicker.spec.tsnpx vitest run src/tests/views/Settings/PolicyWorkbench/settings/signature-text/eslint.config.mjs→libresign/disabled-during-migrationfor remaining deferred rules and their documented reasons🎨 UI / Front‑end changes
ESLint v9 migration baseline and incremental rule fixes across Vue/TS/JS frontend code
Minor Vue/template cleanups from enabled rules (e.g.
curly,vue/attributes-order,vue/no-boolean-default, unused refs)Replaced deprecated
OC.getCurrentUser()with@nextcloud/authwhere flaggedReplaced raw
console.*calls with@nextcloud/loggerviasrc/logger.js(no-console)Screenshots before/after (not applicable — no intentional UI redesign)
Tested in multiple browsers (Chrome, Firefox, Safari) – optional but appreciated
Components, Unit (with vitest) and/or e2e (with Playwright) tests updated where lint fixes touched test code
Accessibility verified (contrast, keyboard navigation, screen reader friendly) – if applicable
Design review approved – optional, link to feedback if available
Documentation updated (if applicable) – docs repository
🚧 Tasks
libresign/disabled-during-migration(imports sorting, stylistic formatting, JSDoc, l10n, Vue event naming, etc.)✅ Checklist
libresign/disabled-during-migrationdocuments remaining deferred rules with reasonsnpm run lintpasses locallymain(merge conflict inpackage.jsonresolved)🤖 AI (if applicable)