{"category_id":"repository","default_severity":"error","description":"Tracked .js, .jsx, .mjs and .cjs paths, case-insensitively, need an exact javascript.artifacts declaration or migration to typed source. Config, vendor, generated and test names do not grant automatic exemptions.","examples":[{"after":"scripts/generate-catalog.mts","before":"scripts/generate-catalog.mjs","expected_severity":"error","id":"sarj-artifact-untyped-javascript-source","language":"text","title":"Typed tooling source"},{"after":"{\"tracked\":[\"generated/rules.mjs\",\"scripts/generate.py\"],\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n[[javascript.artifacts]]\\npath = \\\"generated/rules.mjs\\\"\\nkind = \\\"generated\\\"\\nsource = \\\"scripts/generate.py\\\"\\nreason = \\\"External tools load this generated ESM artifact.\\\"\\n\"}","before":"{\"tracked\":[\"generated/rules.mjs\",\"scripts/generate.py\"],\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\"}","expected_severity":"error","id":"sarj-artifact-untyped-javascript-generated","language":"json","title":"Required Python-generated JavaScript"}],"fix":"Use .mts for authored ESM tooling, .cts for CommonJS, and the framework's typed source convention for applications. Review module loading and callers before migrating. For required JavaScript, declare the exact path, artifact kind and reason; generated output also needs a tracked non-JavaScript source. A declaration records intent and does not prove generation or semantic necessity.","kind":"rule","references":[],"rule_id":"repository/artifacts/untyped-javascript","rule_version":2,"slug":"untyped-javascript","source":{"path":"src/repo_standards/policy_sarj/policy.py","symbol":"repository/artifacts/untyped-javascript"},"title":"Prefer typed source and declare required JavaScript artifacts","topic_id":"artifacts","why":"Authored JavaScript can escape the TypeScript checking contract. Runtime, tool, vendor and fixture artifacts may require JavaScript; explicit declarations make that intent reviewable without inferring it from a filename."}
