feat(format): adopt Nextcloud's prettier config - #114
Merged
Conversation
Adopts @nextcloud/prettier-config (useTabs: true, tabWidth: 4), the tool Nextcloud itself uses, which unlike stylelint covers CSS/SCSS. eslint-config-prettier is spread LAST in eslint.config.js so the two formatters cannot demand opposite things. Measured first: this app's styles were already 84 tab-lines / 0 space-lines, so there was no drift to correct — the value here is the JS/Vue side plus a standing guarantee for the styles. l10n/ is in .prettierignore: 37 generated l10n/*.js translation bundles.
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
August 13, 2026 08:22
Contributor
Quality Report — ConductionNL/launchpad @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 548/548 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-13 08:39 UTC
Download the full PDF report from the workflow artifacts.
Contributor
Author
Gate results — PR vs
|
| gate | development |
this PR | mine? |
|---|---|---|---|
| gate-7 no-admin-idor | FAIL 2 | FAIL 2 | no — identical |
| gate-19 e2e-coverage | FAIL 128 | FAIL 128 | no — identical |
| gate-26 visual-coverage | FAIL 1 | FAIL 1 | no — identical |
| gate-57 orphaned-write-capability | FAIL 1 | FAIL 1 | no — identical |
| gate-16 spec-coverage | PASS | FAIL 18 | no — known false positive |
gate-16 is the only gate that moves, and it is the false positive already being fixed in
the gate. It inspects frontend methods, and its normaliser deliberately does not
normalise JS re-wraps (ASI / array elision), so every prettier-touched method reads as
"changed" and the gate demands an @spec tag.
Nothing has been annotated to satisfy it and the glob has not been narrowed to dodge it —
adding @spec tags to methods nobody changed would bake the defect in.
Every other failing gate reports the identical count on both sides.
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.
What this is
Part of the fleet-wide adoption of
@nextcloud/prettier-config(
useTabs: true, tabWidth: 4) — the tool Nextcloud itself uses, and the only one in ourstack that covers CSS/SCSS, since
@nextcloud/stylelint-configcarries no indentationrule (stylelint 15+ dropped stylistic rules).
Measured first: this app had no style drift
The rollout's premise is that CSS has drifted from the
.editorconfigthat saysindent_style = tab— true elsewhere (openconnector 32 tab / 603 space, opencatalogi27 / 347, openregister 219 / 522). Not here. launchpad's styles measure
84 tab-lines / 0 space-lines before and after.
That is not an argument against adopting prettier here; it is the reason to. The
compliance was unenforced — nothing in CI would have noticed it slipping. What this PR
adds is (a) an enforcing check over the styles that were already correct, and (b) a
formatter over the JS/Vue side, which is where the 210-file diff comes from.
Credit where due:
#113had already quoted thestylelint:fixglob so it covers what thecheck covers. This is the same defect class one layer out — a rule that exists but reaches
nothing.
Why
eslint-config-prettieris not optionalIt is spread last, so it can only turn rules off. Two formatters with overlapping
jurisdiction make a repo unfixable — the trap this fleet already hit with php-cs-fixer
and PHPCS, where
cs:fixandphpcsdemanded opposite things and neither could besatisfied.
It disables no correctness rule. This app corrects the Vue-2 rule set by hand rather
than via the shared preset, and all 18 of its hand-listed
vue/no-deprecated-*rulesplus
vue/no-reserved-props,vue/no-v-for-template-key-on-childandvue/require-slots-as-functionsremain present and ON — prettier has no opinion aboutany of them.
indentis now off in eslint and enforced by prettier'suseTabs: true:the same tab, from the tool that also covers styles.
Why the glob is code and styles, not
.Unrestricted, prettier would rewrite markdown and JSON that has its own generator:
openspec/**@specanchors, gate-19 reads Scenario headings. A formatter and a gate disagreeing about one file is how the gate loses quietlyl10n/**lib/Settings/**.jsonSo the glob is
**/*.{js,ts,vue,css,scss}, with build output in.prettierignore.l10n/is in.prettierignore, which the larpingapp pilot did not need. This appcarries 37 generated
l10n/*.jsbundles (OC.L10N.register(…), four-space indent);the pilot app is JSON-only. It is also not gitignored, which makes this the one
load-bearing entry in the file — prettier 3 reads
.gitignoreas an ignore path bydefault, so
js/,coverage/andphpmetrics/would have been excluded anyway. Theyare kept explicit regardless, because an ignore that depends on another file's contents is
one refactor away from silently switching off.
Note: this app had neither of the two hazards
Measured, not assumed — other apps in this rollout hit both:
multiple statements by testing
content.includes(';')and prettier'ssemi: falsedeletes exactly that semicolon (41 build errors on openregister, 18 handlers on
opencatalogi).
on opencatalogi.
So this diff is a pure reformat.
Verified
npm run formatnpm run lintdevelopment: 0 errors, 35 warnings)npm run stylelintdevelopment)npm testnpm run lint:initial-statenpm run lint:translation-domainnpm run check:manifestnpm run buildopenspec/,l10n/,lib/Settings/,docs/,.vscode/The resolved config was asserted before formatting, because a prettier run with no
config silently falls back to defaults and would have written double quotes, which
@nextcloud/prettier-configforbids. It readsuseTabs=true tabWidth=4 singleQuote=true semi=false printWidth=85.Installed with
npx npm@10.8.2— npm 11 poisons the lockfile andnpm cithen fails inCI on jobs that never touch Vue.
Gate results
already being fixed in the gate itself: gate-16 inspects frontend methods, and its
normaliser deliberately does not normalise JS re-wraps (ASI / array elision), so every
prettier-touched method reads as "changed" and the gate demands an
@spectag. Nothinghas been annotated to satisfy it, and the glob has not been narrowed to dodge it —
adding
@spectags to methods nobody changed would bake the defect in.A PR-vs-
developmenttable for the same gates at the same base SHA is posted as acomment below once this run finishes.