Tooling

tooling/use-project-scripts

Run checks through the project's own scripts and package manager; never install tools globally or switch package managers.

minormanualfe-tooling

Why

The project's scripts pin the tool versions, flags and config the team agreed on. Running npx eslint with another version, installing a global tool, or running npm install in a pnpm project rewrites the lockfile, produces different results and creates noise in the pull request.

Fix

Detect the package manager from the lockfile (package-lock.json npm, pnpm-lock.yaml pnpm, yarn.lock Yarn, bun.lock Bun) or the packageManager field, then run <pm> run lint, test, typecheck, build as defined in package.json. If a script is missing, propose adding it rather than running an ad-hoc command.

Examples

# bad: in a pnpm project
npm install && npx eslint .
# good
pnpm install --frozen-lockfile && pnpm run lint

Sources

Facts

Id
tooling/use-project-scripts
Severity
minor
Check
manual a person reviews it; the report lists it as a checklist
Applies to
project
Taught by the skill
fe-tooling Build, lint and format tooling
Since version
0.1.0

Rule file on GitHub

Read it in the terminal

npx github:dawidolko/frontend-skills explain tooling/use-project-scripts