mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 17:02:28 +00:00
Merge pull request #551 from PR0M3TH3AN/codex/update-design-token-scanning-script
Expand design token lint coverage
This commit is contained in:
2 files changed
+9
-1
No files matched your search
@@ -109,6 +109,10 @@ hairline borders or browser reset quirks) add an explicit allowlist entry in
|
||||
`scripts/check-design-tokens.mjs` so future contributors understand why the
|
||||
constant exists.
|
||||
|
||||
The script now crawls every markup-emitting module under `js/blog`, `js/ui`,
|
||||
`js/channelProfile.js`, and `torrent/ui`, so UI tweaks anywhere in the repo
|
||||
benefit from the guard without manual configuration.
|
||||
|
||||
Beacon builds inherit the same rule. `npm run build:beacon` now bundles
|
||||
`torrent/dist` and immediately re-runs the inline-style checker against the
|
||||
fresh output so third-party dependencies cannot sneak inline style mutations
|
||||
|
||||
@@ -9,8 +9,9 @@ const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const repoRoot = path.resolve(__dirname, "..");
|
||||
|
||||
const TARGET_DIRECTORIES = ["js/ui"];
|
||||
const TARGET_DIRECTORIES = ["js/blog", "js/ui", "torrent/ui"];
|
||||
const TARGET_FILES = ["js/channelProfile.js", "css/tailwind.source.css"];
|
||||
const IGNORED_DIRECTORIES = new Set(["dist", "vendor"]);
|
||||
const IGNORED_EXTENSIONS = new Set([".min.js", ".map"]);
|
||||
const ALLOWED_FILES = new Set([
|
||||
"js/ui/components/RevertModal.js",
|
||||
@@ -112,6 +113,9 @@ async function walkDirectory(dir, results) {
|
||||
for (const entry of entries) {
|
||||
const fullPath = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
if (IGNORED_DIRECTORIES.has(entry.name)) {
|
||||
continue;
|
||||
}
|
||||
await walkDirectory(fullPath, results);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user