The Dependabot PR #7876 updates @nextcloud/eslint-config from v8 to v9.
This update also brings ESLint 10 and many new lint rules. After applying the new configuration, LibreSign reports many lint problems in the existing code.
The goal of this issue is to review these problems, fix the code when the rule makes sense for LibreSign, and enable as many rules as possible instead of simply disabling them.
This work should be done on top of #7876.
The current list of pending rules is maintained in the libresign/disabled-during-migration section of eslint.config.mjs. Please use this file as the source of truth.
What to do
Work on one ESLint rule at a time.
For each rule:
- Remove it from
libresign/disabled-during-migration.
- Run
npm run lint.
- Review all reported cases and understand what the rule is trying to improve.
- Fix all cases in a way that makes sense for LibreSign.
- Run related tests when the change can affect behavior.
- Create one commit for that rule.
For example:
fix(lint): enable no-empty
fix(lint): enable vue/no-dupe-keys
fix(lint): enable @typescript-eslint/no-empty-object-type
Keeping one rule per commit is important because some rules can change many files and this makes the pull request easier to review and revert if needed.
Review automatic fixes
npm run lint:fix can be used as a starting point, but every generated change must be reviewed.
An automatic fix is not always the correct fix.
For example:
- Improve long or complex code instead of disabling a formatting rule.
- Write useful documentation when JSDoc is required instead of adding empty comments only to make ESLint pass.
- Replace deprecated APIs when a supported alternative exists.
- Investigate duplicated, unused or suspicious code instead of hiding the warning.
- Be careful with Vue events, slots, translation strings, API fields and backend payload names because changing them can affect behavior.
Prefer fixing the code instead of adding eslint-disable comments or disabling rules globally.
If a rule really does not make sense for LibreSign, it can stay disabled, but explain the reason in the pull request.
Also remove old eslint-disable comments that reference rules that no longer exist.
If enabling a rule reveals a real bug or a problem that should be handled separately, mention it clearly in the pull request.
Acceptance criteria
Good first issue
This is a good opportunity to learn the LibreSign frontend code, Vue, TypeScript and the lint rules used in the Nextcloud ecosystem.
The work can be done rule by rule, which makes it easier to understand the code and review each change separately.
Some lint rules can also reveal real problems that were already hidden in the code, so this task is not only about formatting.
Additional context
- If you have questions, feel free to ask in this issue.
- Give a ⭐️ star to this repository if you find LibreSign useful and would like to support the project.
- You can also join our community: https://t.me/LibreSign
The Dependabot PR #7876 updates
@nextcloud/eslint-configfrom v8 to v9.This update also brings ESLint 10 and many new lint rules. After applying the new configuration, LibreSign reports many lint problems in the existing code.
The goal of this issue is to review these problems, fix the code when the rule makes sense for LibreSign, and enable as many rules as possible instead of simply disabling them.
This work should be done on top of #7876.
The current list of pending rules is maintained in the
libresign/disabled-during-migrationsection ofeslint.config.mjs. Please use this file as the source of truth.What to do
Work on one ESLint rule at a time.
For each rule:
libresign/disabled-during-migration.npm run lint.For example:
Keeping one rule per commit is important because some rules can change many files and this makes the pull request easier to review and revert if needed.
Review automatic fixes
npm run lint:fixcan be used as a starting point, but every generated change must be reviewed.An automatic fix is not always the correct fix.
For example:
Prefer fixing the code instead of adding
eslint-disablecomments or disabling rules globally.If a rule really does not make sense for LibreSign, it can stay disabled, but explain the reason in the pull request.
Also remove old
eslint-disablecomments that reference rules that no longer exist.If enabling a rule reveals a real bug or a problem that should be handled separately, mention it clearly in the pull request.
Acceptance criteria
libresign/disabled-during-migrationare reviewed.eslint-disablecomments for rules that no longer exist are removed.npm run lintpasses.Good first issue
This is a good opportunity to learn the LibreSign frontend code, Vue, TypeScript and the lint rules used in the Nextcloud ecosystem.
The work can be done rule by rule, which makes it easier to understand the code and review each change separately.
Some lint rules can also reveal real problems that were already hidden in the code, so this task is not only about formatting.
Additional context