(filePath: string, directoryPath: string)
| 363 | } |
| 364 | |
| 365 | function assertPathInsideDirectory(filePath: string, directoryPath: string): void { |
| 366 | if (!isPathInsideDirectory(path.resolve(filePath), path.resolve(directoryPath))) { |
| 367 | throw new Error("Rule path must stay inside the rules directory") |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | async function assertRealPathInsideDirectory(filePath: string, directoryPath: string): Promise<void> { |
| 372 | if (!(await isRealPathInsideDirectory(filePath, directoryPath))) { |
no test coverage detected