mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
ci(client): lint:format covers the Playwright specs and the client scripts
The check only looked at src/ and tests/, so a new spec under e2e/ or a new script under scripts/ could land unformatted, and the ratchet scripts themselves did (fixed in the previous commit). It now walks e2e/ and scripts/ too and takes .mjs alongside .ts, .tsx and .css. The 58 files there that were unformatted before this branch (the e2e specs and help guides, the older build and lint scripts) join the baseline, which keeps only shrinking; JSON baselines stay out of scope.
This commit is contained in:
@@ -1,4 +1,62 @@
|
||||
[
|
||||
"e2e/auth.setup.ts",
|
||||
"e2e/create-trip.spec.ts",
|
||||
"e2e/dashboard.spec.ts",
|
||||
"e2e/dates.ts",
|
||||
"e2e/help/admin.guide.ts",
|
||||
"e2e/help/atlas.guide.ts",
|
||||
"e2e/help/collections.guide.ts",
|
||||
"e2e/help/dashboard.guide.ts",
|
||||
"e2e/help/dawarich-track.ts",
|
||||
"e2e/help/external.ts",
|
||||
"e2e/help/fixtures.ts",
|
||||
"e2e/help/guide.ts",
|
||||
"e2e/help/journey.guide.ts",
|
||||
"e2e/help/promote.mjs",
|
||||
"e2e/help/run.mjs",
|
||||
"e2e/help/settings.guide.ts",
|
||||
"e2e/help/trip-bookings.guide.ts",
|
||||
"e2e/help/trip-collab.guide.ts",
|
||||
"e2e/help/trip-costs.guide.ts",
|
||||
"e2e/help/trip-day-detail.guide.ts",
|
||||
"e2e/help/trip-days.guide.ts",
|
||||
"e2e/help/trip-files.guide.ts",
|
||||
"e2e/help/trip-lists.guide.ts",
|
||||
"e2e/help/trip-map.guide.ts",
|
||||
"e2e/help/trip-place.guide.ts",
|
||||
"e2e/help/trip-places.guide.ts",
|
||||
"e2e/help/trip-roadtrip.guide.ts",
|
||||
"e2e/help/trip-shared.ts",
|
||||
"e2e/help/trip-transports.guide.ts",
|
||||
"e2e/help/trip.guide.ts",
|
||||
"e2e/help/vacay.guide.ts",
|
||||
"e2e/helpers.ts",
|
||||
"e2e/ipad-scroll-1432.spec.ts",
|
||||
"e2e/login.public.spec.ts",
|
||||
"e2e/mobile-day-swipe-2051.spec.ts",
|
||||
"e2e/reorder-arrows.spec.ts",
|
||||
"e2e/screenshots/auth.shot.ts",
|
||||
"e2e/screenshots/collab.shot.ts",
|
||||
"e2e/screenshots/detail.shot.ts",
|
||||
"e2e/screenshots/dialogs.shot.ts",
|
||||
"e2e/screenshots/pages.shot.ts",
|
||||
"e2e/screenshots/plan.shot.ts",
|
||||
"e2e/screenshots/planner.shot.ts",
|
||||
"e2e/screenshots/promote.mjs",
|
||||
"e2e/screenshots/seed.setup.ts",
|
||||
"e2e/screenshots/seed.ts",
|
||||
"e2e/screenshots/settings.shot.ts",
|
||||
"e2e/screenshots/shot.ts",
|
||||
"e2e/screenshots/shots.setup.ts",
|
||||
"e2e/server-launch.mjs",
|
||||
"e2e/trip-planner.spec.ts",
|
||||
"e2e/urlbar-scroll-1809.spec.ts",
|
||||
"scripts/build-country-shapes.mjs",
|
||||
"scripts/check-gl-split.mjs",
|
||||
"scripts/check-page-pattern.mjs",
|
||||
"scripts/generate-icons.mjs",
|
||||
"scripts/patch-maplibre.mjs",
|
||||
"scripts/theme-lint.mjs",
|
||||
"src/App.test.tsx",
|
||||
"src/App.tsx",
|
||||
"src/App.versionHandover.test.tsx",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* check came in are listed in scripts/format-baseline.json and the list only
|
||||
* shrinks: every file outside it, a new one in particular, must be formatted,
|
||||
* and a listed file leaves the list once it has been formatted. The check
|
||||
* covers .ts, .tsx and .css under src/ and tests/.
|
||||
* covers .ts, .tsx, .mjs and .css under src/, tests/, e2e/ and scripts/.
|
||||
*
|
||||
* npm run lint:format check against the baseline (CI)
|
||||
* npm run lint:format -- --list print every unformatted file
|
||||
|
||||
@@ -16,9 +16,10 @@ import {
|
||||
writeBaseline,
|
||||
} from './ratchet.mjs';
|
||||
|
||||
export const DIRS = ['src', 'tests'];
|
||||
/** The app, its tests, the Playwright specs and the client's own tooling. */
|
||||
export const DIRS = ['src', 'tests', 'e2e', 'scripts'];
|
||||
|
||||
export const accepts = (key) => /\.(?:tsx?|css)$/.test(key);
|
||||
export const accepts = (key) => /\.(?:tsx?|mjs|css)$/.test(key);
|
||||
|
||||
/**
|
||||
* Whether Prettier leaves the file as it is, with the config that applies to
|
||||
|
||||
Reference in New Issue
Block a user