fix(webapp): make the lint script work - #1237
Merged
Merged
Conversation
`npm run lint` fails with
No files matching the pattern "src/modules/qrcode.vue" were found.
The glob is unquoted, so the shell expands it and hands eslint the
vendored src/modules/qrcode.vue directory as an explicit target. Its
contents are excluded through ignorePatterns in .eslintrc.cjs, so eslint
finds nothing to lint there and exits with an error.
Quoting the pattern lets eslint expand it instead. That skips the
directory, and also applies `**` as a real globstar: sh has no globstar,
so the previous invocation only ever reached one directory level and
never linted src/components/Field/ or src/views/Console/. 73 files are
linted now instead of 37.
The added coverage surfaced one pre-existing error, an unused `and`
import in two record components, which is removed here so that the
script passes.
peterthomassen
force-pushed
the
fix/webapp-lint-glob
branch
from
August 18, 2026 15:42
908a0c2 to
b23ee08
Compare
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.
npm run lintcurrently fails onmain, before it lints anything:Why
The glob is unquoted, so the shell expands it and passes the results to eslint as explicit targets. One of them is
src/modules/qrcode.vue— the vendored copy of the qrcode.vue library, which is a directory, not a file. Everything inside it is excluded viaignorePatterns: ['**/src/modules/**/*']in.eslintrc.cjs, so eslint finds nothing to lint under a target it was explicitly given, and errors out.The exclusion itself is correct; it's the shell expansion that trips over the directory name.
Fix
Quote the pattern so eslint expands it. That skips the directory, and has a second effect worth calling out:
shhas no globstar, sosrc/**/*behaved assrc/*/*and only ever reached one directory level.src/components/Field/andsrc/views/Console/— 31 files — were never linted at all. With eslint doing the globbing,**is a real globstar:src/modules/are linted)The added coverage surfaced exactly one pre-existing error, an unused
andimport inRecordDS.vueandRecordTLSA.vue. Removed here so the script exits clean; nothing else needed fixing.Checks
npm run lintexits 0npm run lint:fixproduces no further changesnpm run buildandnpm test(4 passed) unaffectedSidenote, not addressed here: nothing in
.github/workflows/test.ymlrunslint, which is presumably how this went unnoticed. Happy to add a step if you'd like it.