Repository navigation
Conversation
A regra estava desligada no bloco de migração do eslint. Ao ligá-la, os parâmetros únicos das arrow functions passam a ter parênteses, sem alterar o comportamento. Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
vitormattos
left a comment
There was a problem hiding this comment.
Please review the indentation in some of the files, not just the ones I commented on.
| NcActions: true, | ||
| NcActionButton: true, | ||
| NcButton: true, | ||
| NcDialog: true, | ||
| NcLoadingIcon: true, | ||
| NcNoteCard: true, | ||
| NcTextField: true, |
There was a problem hiding this comment.
I think that have indent issue here.
| signal: new AbortController().signal, | ||
| onUpdate: vi.fn(), | ||
| intervalMs: 0, | ||
| maxChecks: 2, |
There was a problem hiding this comment.
Look this and other points at this file.
A regra estava desligada no bloco de migração do eslint. Ao ligá-la, a posição do parêntese de fechamento e da vírgula final nas listas de argumentos segue o padrão, sem alterar o comportamento. Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
…ow-linebreak A regra estava desligada no bloco de migração do eslint. Ao ligá-la, o corpo das arrow functions fica na mesma linha da seta. Um caso com comentário antes do corpo virou bloco manualmente, sem mudar o retorno. Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
…c-pr1 Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
91c3ced to
570d65b
Compare
|
Thanks for the review, @vitormattos. You were right: @stylistic/indent is still off in this PR, so the autofix of the three new rules rewrote some lines without re-indenting them. I fixed the stub objects in RequestPicker.spec.ts and the signal/onUpdate/intervalMs/maxChecks options in notificationDeliveryStatus.spec.ts. I also reviewed the indentation of every line added by this PR in all touched files, checking with @stylistic/indent enabled locally only (not committed). The same problem existed in a few more specs and in tests/sdk-generation, and I fixed it. Each fix is squashed into the commit of the rule that caused it, so there is still one commit per rule. I also rebased onto the current main and resolved the conflicts in eslint.config.mjs. git diff --check, lint, ts:check, the unit tests and the build all pass. One pre-existing mis-indented line in SignPDF.vue is untouched, since it was already like that on main. |
…c-pr1 Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Other Merge Risk:
|
Resolves: #9498
📝 Summary
First of two PRs for #9498, as discussed in the issue. It enables three
@stylisticrules that were set to'off'in thelibresign/disabled-during-migrationblock ofeslint.config.mjs. There is one DCO-signed commit per rule, with no behavior change:@stylistic/arrow-parens@stylistic/exp-list-style@stylistic/implicit-arrow-linebreakOnly the
'off'override of each rule was removed, so the options inherited from@nextcloud/eslint-configapply. The fixes were applied witheslint --fix --fix-type layoutlimited to the lint scope, not with a repository-widelint:fix. I reviewed the whole diff and every change is parentheses, argument-list layout or line breaks. The second PR will coverfunction-paren-newline,member-delimiter-style,max-statements-per-lineandsemi.Violations measured on the current
main, with the rule enabled:srcplaywrightarrow-parensexp-list-styleimplicit-arrow-linebreakThe full
npm run lintalso reported 7 extraarrow-parenshits inscripts/andtests/, which are fixed in the same commit. The totals are higher than the historical estimates in the issue (~168, ~34, ~39), which the issue itself describes as old measurements.One case needed a manual fix:
formatAllowOverrideinsrc/views/Settings/PolicyWorkbench/settings/mail-sender-strategy/realDefinition.ts.eslint --fixdoes not touch an arrow function that has a comment between the arrow and its body, so it now uses a block body. The translator comment is kept, andnpm run lint:translator-hintsstill passes.🧪 How to test
git diff --check npm run lint npm run ts:check npm test npm run buildTo check one rule on its own, check out its commit and run
npx eslintwith no extra flags. Each commit leaves lint without errors.Validation evidence
npm test: 286 files, 3731 tests passed)npm run lint(0 errors, 21 warnings that already existed),npm run lint:translator-hints,npm run ts:checknpm run buildfinished without errors🎨 UI / Front-end changes
🚧 Tasks
function-paren-newline,member-delimiter-style,max-statements-per-line,semi✅ Checklist
🤖 AI (if applicable)
Summary by CodeRabbit