typescript — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited typescript (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
These are hard rules. Check every piece of TypeScript you write, review, or modify against this list.
enum. Use as const objects + inferred type instead. // wrong
enum Status { Active, Inactive }
// correct
const STATUS = { Active: 'active', Inactive: 'inactive' } as const;
type Status = typeof STATUS[keyof typeof STATUS];any. Use unknown with type guards to narrow.extends, or implements.as X) unless no alternative exists. Narrow with control flow instead. If unavoidable, add a comment explaining why.as Record<string, unknown> inside type guards, to access properties on a narrowed object. No other as casts — validate with typeof, in, or equality checks. When checking membership in a const object, widen the array type to ReadonlyArray<string> instead of casting the value: function isUser(value: unknown): value is User {
if (typeof value !== 'object' || value === null) return false;
const obj = value as Record<string, unknown>; // only acceptable assertion
const validRoles: ReadonlyArray<string> = Object.values(USER_ROLE);
return typeof obj.name === 'string' && typeof obj.role === 'string' && validRoles.includes(obj.role);
// ↑ widen to ReadonlyArray<string> — do NOT cast obj.role as SomeType
} const config = { port: 3000, host: 'localhost' } satisfies ServerConfig;index.ts re-exports) except designated package entry points.import { bar } from './utils/bar', not from './utils'.vite.config.ts, eslint.config.ts, etc.). Use named exports everywhere else.import/export. Never require() or module.exports.@ts-ignore. Use @ts-expect-error with an explanation comment if suppression is truly needed.!) unless provably safe. If used, add a comment explaining the proof.let only when reassignment is needed. Never var.default case with a never check: default: {
const _exhaustive: never = value;
throw new Error(`Unhandled case: ${_exhaustive}`);
}readonly properties, ReadonlyArray<T>, Readonly<T>.| Thing | Convention | Example |
|---|---|---|
| Files | kebab-case | user-service.ts |
| Types / Interfaces | PascalCase | UserProfile |
| Functions / variables | camelCase | getUserById |
| Constants | UPPER_SNAKE_CASE | MAX_RETRY_COUNT |
| Schema interfaces | <Name>Schema | UserSchema |
catch blocks. Log, rethrow, or handle explicitly. type Result<T, E = Error> = { ok: true; value: T } | { ok: false; error: E };~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.