- Flag bare `@import "bootstrap"` and paths into node_modules: Vite
resolves the bare name through the package's "sass" field to
scss/bootstrap.scss, so it compiles all of Bootstrap.
- Flag `@import"base"` with no space after the at-rule.
- Resolve the scanned roots relative to the script so it also works when
run from outside client/.
- Export the matcher and cover it with a vitest test.
- Run the check as part of `make client-lint`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base.scss pattern only matched the bare and @/style/scss/ forms, so relative imports like ../../style/scss/base.scss or scss/base.scss got through. base.scss is the only file with that name in the client, so match any path ending in it. Also catch the legacy ~bootstrap prefix.
Importing base.scss or all of Bootstrap into a component's style block
compiles a separate scoped copy of the whole thing into base.css, which
is how four of them added up to 2.5 MB before #23703 removed them. This
adds a small script to the client lint job that fails if one shows up
again and points at theme/blue.scss instead.