Skip to content

chore: replace deprecated pepr format with eslint and prettier#2796

Open
eoghanriley wants to merge 3 commits into
mainfrom
eoghanriley/core-583
Open

chore: replace deprecated pepr format with eslint and prettier#2796
eoghanriley wants to merge 3 commits into
mainfrom
eoghanriley/core-583

Conversation

@eoghanriley

Copy link
Copy Markdown
Contributor

Description

Replaces usage of the soon to be deprecated pepr format command with direct usage of eslint and prettier through
npm run format and npm run format:check

Related Issue

Fixes CORE-583

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Steps to Validate

  • If this PR introduces new functionality to UDS Core or addresses a bug, please document the steps to test the changes.

Compare output from new format command to the deprecated pepr format:
npm run format:check
npx pepr format -v

Checklist before merging

@eoghanriley
eoghanriley requested a review from a team as a code owner July 8, 2026 19:40
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces the deprecated npx pepr format command with direct calls to eslint and prettier via new npm run format and npm run format:check scripts. The underlying tooling (eslint config, prettier config) was already present in the repo, so behaviour is equivalent to before.

  • Adds eslint, prettier, @typescript-eslint/eslint-plugin, and @typescript-eslint/parser as explicit devDependencies, removing the implicit reliance on them as transitive deps of pepr.
  • Updates every call site (tasks/lint.yaml, src/*/tasks.yaml, .lintstagedrc.cjs, .husky/pre-commit) and the contributor docs to use the new commands.

Confidence Score: 5/5

Safe to merge — all changed files are tooling configuration and documentation with no runtime code modified.

The change is a mechanical replacement of npx pepr format calls with npm run format across task files, pre-commit hooks, and lint-staged config. The eslint and prettier configurations it relies on already existed in the repo and are unchanged. Direct devDependencies are now explicitly declared, which is an improvement over relying on transitive deps from pepr.

No files require special attention.

Important Files Changed

Filename Overview
package.json Adds format and format:check scripts invoking eslint and prettier directly; adds eslint, prettier, and @typescript-eslint/* as explicit devDependencies.
package-lock.json Promotes prettier from peer to direct dep; adds @typescript-eslint packages; minor version range discrepancy between this file and package.json for eslint and @typescript-eslint packages.
.lintstagedrc.cjs Replaces npx pepr format --validate-only with npm run format:check; minor cosmetic reformat (indentation, quotes).
.husky/pre-commit Removes 'Pepr' from user-facing log messages; no functional change.
tasks/lint.yaml Replaces npx pepr format / npx pepr format --validate-only with npm run format / npm run format:check.
CONTRIBUTING.md Updates TypeScript formatting toolchain description from Pepr's formatter to eslint and prettier directly.
src/pepr/tasks.yaml Replaces npx pepr format with npm run format.
src/istio/tasks.yaml Replaces npx pepr format with npm run format and updates step description.
src/prometheus-stack/tasks.yaml Replaces npx pepr format with npm run format and updates step description.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (deprecated)"]
        A1["npx pepr format"] --> B1["pepr internal eslint + prettier"]
        A2["npx pepr format --validate-only"] --> B2["pepr internal eslint check"]
    end

    subgraph After["After (this PR)"]
        C1["npm run format"] --> D1["eslint **/*.ts --fix"]
        D1 --> D2["prettier --write **/*.ts"]
        C2["npm run format:check"] --> E1["eslint **/*.ts"]
        E1 --> E2["prettier --check **/*.ts"]
    end

    subgraph Configs["Shared Configs (unchanged)"]
        F1["eslint.config.mjs"]
        F2[".prettierrc"]
    end

    After --> Configs
    Before -.->|"previously used"| Configs

    subgraph CallSites["Call Sites (updated)"]
        G1["tasks/lint.yaml"]
        G2["src/pepr/tasks.yaml"]
        G3["src/istio/tasks.yaml"]
        G4["src/prometheus-stack/tasks.yaml"]
        G5[".lintstagedrc.cjs (pre-commit)"]
    end

    C1 & C2 --> CallSites
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph Before["Before (deprecated)"]
        A1["npx pepr format"] --> B1["pepr internal eslint + prettier"]
        A2["npx pepr format --validate-only"] --> B2["pepr internal eslint check"]
    end

    subgraph After["After (this PR)"]
        C1["npm run format"] --> D1["eslint **/*.ts --fix"]
        D1 --> D2["prettier --write **/*.ts"]
        C2["npm run format:check"] --> E1["eslint **/*.ts"]
        E1 --> E2["prettier --check **/*.ts"]
    end

    subgraph Configs["Shared Configs (unchanged)"]
        F1["eslint.config.mjs"]
        F2[".prettierrc"]
    end

    After --> Configs
    Before -.->|"previously used"| Configs

    subgraph CallSites["Call Sites (updated)"]
        G1["tasks/lint.yaml"]
        G2["src/pepr/tasks.yaml"]
        G3["src/istio/tasks.yaml"]
        G4["src/prometheus-stack/tasks.yaml"]
        G5[".lintstagedrc.cjs (pre-commit)"]
    end

    C1 & C2 --> CallSites
Loading

Reviews (2): Last reviewed commit: "chore: add eslint and prettier as devDep..." | Re-trigger Greptile

Comment thread package.json
Comment thread .lintstagedrc.cjs
@joelmccoy

Copy link
Copy Markdown
Contributor

@greptileai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants