Skip to content

Commit 348dcc4

Browse files
committed
Generated docs should use Unix line endings on Windows
1 parent 145a0a0 commit 348dcc4

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.gitattributes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
*.css eol=lf
1414
*.scss eol=lf
1515
*.html eol=lf
16-
*.svg eol=lf
16+
*.svg eol=lf
17+
18+
# Generated documentation should have LF line endings to reduce git noise
19+
docs/lint/**/*.md eol=lf

lint/generate-docs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import { default as tsPlugin } from './src/rules/ts';
2020

2121
const templates = new Map();
2222

23-
function lazyEJS(path: string, data: object) {
23+
function lazyEJS(path: string, data: object): string {
2424
if (!templates.has(path)) {
2525
templates.set(path, require('ejs').compile(readFileSync(path).toString()));
2626
}
2727

28-
return templates.get(path)(data);
28+
return templates.get(path)(data).replace(/\r\n/g, '\n');
2929
}
3030

3131
const docsDir = join('docs', 'lint');

0 commit comments

Comments
 (0)