TypeScript configuration (tsconfig.json) for MetaSaver projects with no-barrel architecture support. Use when creating or auditing tsconfig.json files to ensure proper path aliases (baseUrl, paths with
Validates tsconfig.json for MetaSaver projects, enforcing 5 rules including #/* path aliases for no-barrel architecture. Use when creating or auditing TypeScript configs to ensure proper compiler options, strict mode, and type generation.
/plugin marketplace add metasaver/metasaver-marketplace/plugin install core-claude-plugin@metasaver-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Provides tsconfig.json validation logic for TypeScript configuration with no-barrel architecture support.
Configure TypeScript compiler options, path aliases, and module resolution to support:
#/* path alias| Rule | Requirement | Details |
|---|---|---|
| 1 | Compiler options | target: "ES2022", module: "ESNext", moduleResolution: "node" |
| 2 | Path alias configuration | baseUrl: ".", paths with "#/": ["./src/"] |
| 3 | Type generation | declaration: true, declarationMap: true |
| 4 | Strict mode | strict: true |
| 5 | Output configuration | outDir: "./dist", rootDir: "./src" |
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"#/*": ["./src/*"]
}
}
}
Critical: baseUrl MUST be present when using paths. The #/* alias enables direct module imports without barrel files.
{
"compilerOptions": {
"declaration": true,
"declarationMap": true
}
}
{
"compilerOptions": {
"strict": true
}
}
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
}
}
Validation checks (pseudo-code):
// Rule 1: Compiler options
validate(config.compilerOptions?.target === "ES2022");
validate(config.compilerOptions?.module === "ESNext");
validate(config.compilerOptions?.moduleResolution === "node");
// Rule 2: Path alias configuration (No-Barrel Architecture)
if (config.compilerOptions?.paths) {
if (!config.compilerOptions?.baseUrl) {
errors.push("Rule 2: baseUrl must be present when using paths");
}
if (!config.compilerOptions?.paths?.["#/*"]) {
errors.push("Rule 2: Missing paths['#/*'] for no-barrel imports");
} else {
const pathMapping = config.compilerOptions.paths["#/*"];
if (!Array.isArray(pathMapping) || pathMapping[0] !== "./src/*") {
errors.push("Rule 2: paths['#/*'] must point to ['./src/*']");
}
}
}
// Rule 3: Type generation
validate(config.compilerOptions?.declaration === true);
validate(config.compilerOptions?.declarationMap === true);
// Rule 4: Strict mode
validate(config.compilerOptions?.strict === true);
// Rule 5: Output configuration
validate(config.compilerOptions?.outDir === "./dist");
validate(config.compilerOptions?.rootDir === "./src");
| Violation | Issue | Remediation |
|---|---|---|
| Missing baseUrl | paths defined without baseUrl | Add "baseUrl": "." to compilerOptions |
| Missing #/* path mapping | No path alias for no-barrel imports | Add "paths": { "#/": ["./src/"] } |
| Incorrect path mapping | #/* points to wrong directory | Update paths["#/"] to ["./src/"] |
| Missing declaration | No type generation configured | Add "declaration": true, "declarationMap": true |
| Non-strict mode | TypeScript not in strict mode | Add "strict": true |
baseUrl when using paths#/* alias for no-barrel architecture/skill scope-check if not provided/skill audit-workflow/skill remediation-optionsroot-package-json-config, vitest-config, vite-config