Generated docs should use Unix line endings on Windows

This commit is contained in:
Yury Bondarenko
2024-04-25 12:13:41 +02:00
parent 145a0a04b6
commit 348dcc47fd
2 changed files with 6 additions and 3 deletions

View File

@@ -20,12 +20,12 @@ import { default as tsPlugin } from './src/rules/ts';
const templates = new Map();
function lazyEJS(path: string, data: object) {
function lazyEJS(path: string, data: object): string {
if (!templates.has(path)) {
templates.set(path, require('ejs').compile(readFileSync(path).toString()));
}
return templates.get(path)(data);
return templates.get(path)(data).replace(/\r\n/g, '\n');
}
const docsDir = join('docs', 'lint');