@heyramzi/lint 2.11.2 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/file-tokens.js +8 -0
- package/package.json +1 -1
- package/scripts/reddit-bench-harvest.mjs +1 -1
- package/ui-rules.js +2 -1
package/README.md
CHANGED
|
@@ -369,7 +369,7 @@ thread's title and body sit in `threadText`. The file stays out of the npm tarba
|
|
|
369
369
|
exits with its code:
|
|
370
370
|
|
|
371
371
|
```sh
|
|
372
|
-
cd ~/Studio/
|
|
372
|
+
cd ~/Studio/upsys/kit && bun ./CLIs/scripts/secrets.mjs run --mode development \
|
|
373
373
|
--file 'CLIs/.env' --shell "bun packages/lint/scripts/reddit-bench-harvest.mjs"
|
|
374
374
|
```
|
|
375
375
|
|
package/file-tokens.js
CHANGED
|
@@ -44,6 +44,13 @@ export const DEFAULT_IGNORED = [
|
|
|
44
44
|
/** Projections that live under a tracked folder agents also write in. */
|
|
45
45
|
const IGNORED_PREFIXES = [".github/skills/"];
|
|
46
46
|
|
|
47
|
+
/** Code a skill vendors whole from upstream (its README.md): the next refresh undoes any fix, inside upsys or not. */
|
|
48
|
+
const VENDORED_TREES = ["ai-doc/skills/apple/release/app-store-screenshots/template/"];
|
|
49
|
+
|
|
50
|
+
export function vendoredPath(file) {
|
|
51
|
+
return VENDORED_TREES.some((tree) => file.startsWith(tree) || file.includes(`/${tree}`));
|
|
52
|
+
}
|
|
53
|
+
|
|
47
54
|
/** Data, transcripts and tool-managed files: nobody splits a dataset, a call recording or an Xcode project by hand. */
|
|
48
55
|
const DATA_EXTENSIONS =
|
|
49
56
|
/\.(json|jsonl|ndjson|csv|tsv|txt|srt|vtt|pdf|xcstrings|strings|pbxproj|excalidraw|tldr|geojson)$/i;
|
|
@@ -104,6 +111,7 @@ export function generatedPath(file) {
|
|
|
104
111
|
if (LOCKFILES.has(name)) return true;
|
|
105
112
|
if (GENERATED_NAMES.some((pattern) => pattern.test(name))) return true;
|
|
106
113
|
if (IGNORED_PREFIXES.some((prefix) => file.startsWith(prefix))) return true;
|
|
114
|
+
if (vendoredPath(file)) return true;
|
|
107
115
|
return inTrees(parts, GENERATED_TREES);
|
|
108
116
|
}
|
|
109
117
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* into data/reddit-bench.json, then reruns scripts/reddit-bench.mjs and exits with its code.
|
|
5
5
|
* A row once bad stays bad, so the bench only grows. Needs the logged-in Orca tab on old.reddit.com:
|
|
6
6
|
*
|
|
7
|
-
* cd ~/Studio/
|
|
7
|
+
* cd ~/Studio/upsys/kit && bun ./CLIs/scripts/secrets.mjs run --mode development \
|
|
8
8
|
* --file 'CLIs/.env' --shell "bun packages/lint/scripts/reddit-bench-harvest.mjs"
|
|
9
9
|
*
|
|
10
10
|
* `--no-bench` stops after the harvest.
|
package/ui-rules.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The UI-rules gate: CSS, markup and config checks the impeccable detector misses.
|
|
3
3
|
* Pure here, git and process in `bin/heyramzi-ui-rules.js`.
|
|
4
4
|
*/
|
|
5
|
-
import { generatedContent } from "#lint/file-tokens.js";
|
|
5
|
+
import { generatedContent, vendoredPath } from "#lint/file-tokens.js";
|
|
6
6
|
import { blankCode, CSS_MESSAGES, cssBlockRules, cssTextRules } from "#lint/ui-rules-css.js";
|
|
7
7
|
import { MARKUP_MESSAGES, markupTextRules, tagRules } from "#lint/ui-rules-markup.js";
|
|
8
8
|
|
|
@@ -363,6 +363,7 @@ export function checkProject(files, tracked, read) {
|
|
|
363
363
|
|
|
364
364
|
/** Skip generated and vendored trees. */
|
|
365
365
|
export function ignoredPath(file, extra = []) {
|
|
366
|
+
if (vendoredPath(file)) return true;
|
|
366
367
|
const parts = file.split("/");
|
|
367
368
|
return [...DEFAULT_IGNORED, ...extra].some((entry) => parts.includes(entry));
|
|
368
369
|
}
|