(filePath: string, directoryPath: string)
| 380 | } |
| 381 | |
| 382 | function isPathInsideDirectory(filePath: string, directoryPath: string): boolean { |
| 383 | const relativePath = path.relative(directoryPath, filePath) |
| 384 | return relativePath !== "" && !relativePath.startsWith("..") && !path.isAbsolute(relativePath) |
| 385 | } |
| 386 | |
| 387 | function createRuleId(scope: RuleScope, kind: RuleKind, modeSlug: string | undefined, relativePath: string): string { |
| 388 | return [scope, kind, modeSlug ?? "generic", relativePath].join(":") |
no outgoing calls
no test coverage detected