Skip to content

Commit

Permalink
fix: lint always fails on windows github runners due to line endings (#…
Browse files Browse the repository at this point in the history
…92)

* fix: lint always fails on windows github runners due to line endings

* refactor: use .gitattributes to force line endings so linting passes on windows
  • Loading branch information
joeflateau authored Nov 17, 2021
1 parent 220dcbf commit c6f0b8b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,14 @@ prog
overwrite: true,
}
);
// fix gitignore
await fs.move(
path.resolve(projectPath, './gitignore'),
path.resolve(projectPath, './.gitignore')
);
// fix dotfiles
const dotfiles = ['gitignore', 'gitattributes'];
for (const dotfile of dotfiles) {
await fs.move(
path.resolve(projectPath, `./${dotfile}`),
path.resolve(projectPath, `./.${dotfile}`)
);
}

// update license year and author
let license: string = await fs.readFile(
Expand Down
1 change: 1 addition & 0 deletions templates/basic/gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
1 change: 1 addition & 0 deletions templates/react-with-storybook/gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
1 change: 1 addition & 0 deletions templates/react/gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf

0 comments on commit c6f0b8b

Please sign in to comment.