Skip to content

fix(lint): review and enable rules from @nextcloud/eslint-config v9 migration - #8067

Closed
masterlouis wants to merge 4 commits into
LibreSign:dependabot/npm_and_yarn/nextcloud/eslint-config-9.0.1from
masterlouis:fix/lint-migration
Closed

fix(lint): review and enable rules from @nextcloud/eslint-config v9 migration#8067
masterlouis wants to merge 4 commits into
LibreSign:dependabot/npm_and_yarn/nextcloud/eslint-config-9.0.1from
masterlouis:fix/lint-migration

Conversation

@masterlouis

@masterlouis masterlouis commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Related to #7876

📝 Summary

Follow-up of #7876 (@nextcloud/eslint-config v8 → v9 upgrade). This PR
reviews and progressively enables the ESLint rules newly introduced by
v9, tracked in libresign/disabled-during-migration in
eslint.config.mjs, one rule per commit as requested in the issue.

⚠️ This branch is built on top of #7876, which is not yet merged into
main. Once #7876 lands, this diff will shrink to just the
lint-migration work.

What's done so far

  • Fixed two config scoping bugs surfaced by the v9 upgrade (both
    needed before npm run lint could even run):
    • vue/no-unused-components is now scoped to files: ['**/*.vue']
      only. In v9 the vue plugin is registered only for .vue files,
      so applying this rule globally crashed ESLint on non-Vue files.
    • Removed import/order and import/no-unresolved, which relied on
      eslint-plugin-import — no longer a dependency of
      @nextcloud/eslint-config v9. Import ordering is now handled by
      perfectionist/sort-imports (already provided by the shared
      config), which will be reviewed as its own rule.
  • Removed obsolete eslint-disable comments referencing rules
    that no longer exist, or no longer apply in their file's context
    (import/no-named-as-default, import/no-unresolved,
    jsdoc/require-jsdoc, an unused no-new directive).
  • Enabled no-console: replaced application-level
    console.error / console.warn calls across 13 files with the
    project's existing src/logger.js wrapper around
    @nextcloud/logger, passing error/context as a structured object
    (e.g. logger.error('Failed to save filters', { error })) instead
    of loose positional arguments. Test files that intentionally
    intercept console.* for assertions (src/tests/setup.js,
    src/tests/store/filters.spec.ts) are excluded via a scoped
    no-console: off override, since that's test tooling rather than
    application logging.

Still to do

Remaining rules in libresign/disabled-during-migration (~96 rules)
will be enabled incrementally, one commit per rule, following the
process described in the issue.

🧪 How to test

  1. npm ci
  2. npm run lint → should report 0 problems
  3. npm run test:unit -- --run → should pass with no new failures

✅ Checklist

  • I have read and followed the contribution guide.
  • Work in progress — not ready for final review/merge yet.

lfals pushed a commit to lfals/libresign that referenced this pull request Aug 28, 2026
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

Copy link
Copy Markdown
Member

@masterlouis, closing this as it has been superseded by:

Your commits were moved to #8101 using cherry-pick.

@github-project-automation github-project-automation Bot moved this from 0. Backlog to 4. to release in Roadmap Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants