Repository navigation
fix(dev-tooling): run path-scoped JS lint through the local binary - #198
Merged
Martin Bens (SpiGAndromeda) merged 6 commits intoOct 27, 2026
Merged
Conversation
Path-scoped ESLint runs start the package's own binary through `npm exec --no --` instead of the target-less npm script `lint:debugging`, so the package no longer has to define it. The run is refused when `node_modules/.bin/eslint` is missing, because `npm exec --no` installs nothing but would run a globally installed binary. A scope's Stylelint config is appended on both routes without reading the aggregate script for a config of its own, which removes `js_stylelint_script_passes_config` and its recursion through nested `npm run` bodies. Under a scope, ESLint and app-tree paths lose only a leading `<scope cwd>/`, so a plugin's own `app/administration` or `app/storefront` segment stays. Every scope config path is checked for shell-hostile characters and quoted before it reaches the wrapper. `jest_run` on both servers always runs the `unit` script, which already carries `--ci`, so the fallback route is gone and `ci` is accepted and ignored. Coverage is documented as collected on every core run. Installation and dependency checks moved after the argument refusals, so a refused call installs nothing. `vitest_run` accepts only `shopware`, and the build and aggregate tools ignore `default_scope` because a plugin package defines none of the core scripts. The ddev glob refusal covers every ddev call, not only a call targeting a worktree. Co-Authored-By: Claude <noreply@anthropic.com>
`reference.md` describes the Administration ESLint `npm exec --no -- eslint` route for `paths` and its refusal when `node_modules/.bin/eslint` is missing. `jest_run` on both servers is documented as always running the package's `unit` script, which passes `--ci` in core, with `ci` accepted and ignored. A scope's Stylelint config is documented as appended without inspecting the aggregate script, and the `ddev` glob and directory refusal as covering every call. The README and `reference.md` list the tools that ignore `default_scope` when `scope` is omitted, and `vitest_run` refusing plugin scopes. `AGENTS.md` drops the removed Stylelint config detector and the `lint:debugging` route. Co-Authored-By: Claude <noreply@anthropic.com>
Agent Skills ExportBuilt 7 skill packages: |
A scoped Stylelint run without `paths` is refused when the aggregate script's own body already passes `--config` or `-c` to `stylelint`, because the appended scope config cannot apply there. `js_refuse_second_config` reads only that body, not scripts it reaches through `npm run`. `jest_run` appends `--ci` again when `ci` is true, since a plugin package's `unit` script may lack it, and the `unit` append gate now runs before `_jest_install_if_missing`. The ESLint path rebase strips a scope `cwd` written with a leading `./` or a trailing `/`. Under `ddev`, a glob or directory path holding a space, a tab, `"` or `#` is no longer refused, because `ddev exec` quotes it again. When a core-only tool refuses missing dependencies under a plugin `default_scope`, the refusal names `worktree_prepare` with scope `"shopware"`. Under a plugin scope, the Storefront `views/components` refusal no longer points at `vitest_run`. `scope_config_arg_or_refuse` and `resolve_core_scope` in `scope.sh` replace the config guard-and-quote block and the core-scope stanza copied across the JS tools. Co-Authored-By: Claude <noreply@anthropic.com>
`tsc_check` reads the scope's `tsc.config`, so it resolves the call's scope or `default_scope` again instead of always running the core package. The scope schema description and the session-start scope text name the tools that still ignore `default_scope`: `lint_all`, `lint_twig`, `unit_setup`, `vite_build`, `webpack_build` and `vitest_run`. The `worktree_prepare` hint with scope `"shopware"` is added only when the tool ran in the core package, since an explicit plugin scope runs it in the plugin's package. `js_rebase_package_path` replaces both ESLint rebase functions. Under a scope it also strips the cwd from a `./`-prefixed or absolute path, and a cwd of `./` or `/` leaves the path unchanged. The ddev glob exemption no longer lists `"`, which `parse_paths_json` already refuses under ddev. `scope_config_flag_or_refuse` replaces the scoped `--config` block at the ESLint and Stylelint call sites, and `vitest_run` uses `resolve_core_scope`. Co-Authored-By: Claude <noreply@anthropic.com>
Under a scope, `js_rebase_package_path` strips a cwd found inside a path only when the path is absolute, so a relative path that contains the cwd keeps its leading segments. A path naming the cwd itself, `./` and a rebased empty path now map to `.`. `tsc_check` under a plugin scope refuses when the package defines no `lint:types` script and names scope `"shopware"`, instead of letting npm fail with "Missing script". `scope_core_assert_dependencies` is renamed `scope_assert_dependencies`, and `tsc_check` uses it again. Its hint names `worktree_prepare` with the scope the tool ran under whenever that differs from `default_scope` (or `shopware` when unset), which covers an explicit plugin scope. The Stylelint and Storefront ESLint config refusals no longer suggest scope `"shopware"`, which lints the core package. `vitest_run` resolves `shopware` directly. The schema and session-start text name `ludtwig_check` and `ludtwig_fix`, and the Storefront `paths` descriptions limit the package-prefix form to unscoped runs. Co-Authored-By: Claude <noreply@anthropic.com>
`tsc_check` under a plugin scope now probes `lint:types` with `npm pkg get` before it runs, so its first npm call no longer shows that the override config reached the worktree call. `lint_all` with an explicit scope runs `npm run lint:all` in the scope directory without a probe. Co-Authored-By: Claude <noreply@anthropic.com>
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.
The two JS tool servers now route path-scoped ESLint through the package's own binary, and give Jest, Vitest, the build tools and the scope paths one behavior on every call. A path-scoped ESLint call that would have used a global binary is refused. No tool or parameter was removed.
This PR carries no version bump.
eslint_checkandeslint_fixwithpathsrun the package's own binary throughnpm exec --no -- eslintinstead of thelint:debuggingscript.node_modules/.bin/eslintis missing, becausenpm exec --nowould run a global binary instead.<scope cwd>/, so a plugin's ownapp/administrationorapp/storefrontsegment stays. A scopecwdwritten with a leading./or a trailing/is stripped the same way, a./-prefixed path loses./<scope cwd>/, and an absolute path loses everything through/<scope cwd>/. A path naming the scope cwd itself maps to..tsc_checkare checked for shell-hostile characters and quoted.pathsreads only the aggregate script's own body for a--configor-cand refuses when it finds one. Before, the check also followed scripts reached throughnpm run, which is removed.jest_runon both servers always runs the package'sunitscript. The coreunitscripts pass--ci.jest_runroute throughjest:baseand its fallback notice are removed.ci: trueappends--ci, for a plugin package whoseunitscript lacks it.unitscripts run in CI mode, the core Administration collects coverage on every run and core Storefront Jest writes no missing snapshot unlessupdateSnapshotsis set.jest_runchecks its scope and test-pattern arguments and theunitscript before installing dependencies, so a call refused by one of those checks installs nothing.jest_runrefuses a barecomponents/test path pattern only under scopeshopware. Under a plugin scope, theviews/componentsrefusal no longer points atvitest_run.vitest_runaccepts only scopeshopwareor no scope, ignoresdefault_scope, and refuses any plugin scope.vite_build,webpack_build,lint_all,lint_twigandunit_setupignoredefault_scopewhenscopeis omitted. When one of these tools,tsc_checkorvitest_runrefuses missing dependencies under a scope other than the default scope, the refusal namesworktree_preparewith the scope the tool ran under.tsc_checkkeeps usingdefault_scope, because a scope can set itstsc.config, and under a plugin scope it refuses when the package defines nolint:typesscript.webpack_builddrops itshot/watchrefusal branch, since themodeenum accepts onlydevelopmentandproduction.ddev, path-scoped Stylelint and Prettier runs refuse glob and directory paths on every call, not only on a call targeting a worktree. A path holding a space, a tab or#is accepted, becauseddev execquotes it again.Docs:
plugins/dev-tooling/docs/reference.md,plugins/dev-tooling/README.mdandplugins/dev-tooling/AGENTS.mddocument the ESLint, Stylelint, Jest, Vitest and scope behavior. The scope schema'sdefault_scopedescription and the session-start scope text name the tools that ignoredefault_scope.