Skip to content

Commit

Permalink
feat(cli): add editorconfig support
Browse files Browse the repository at this point in the history
  • Loading branch information
ModyQyW committed Feb 24, 2024
1 parent d8e18e2 commit 5759c79
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const program = new Command()
.option('--commitlint', 'setup commitlint')
.option('--lint-staged', 'setup lint-staged')
.option('--simple-git-hooks', 'setup simple-git-hooks')
.option('--editorconfig', 'setup .editorconfig')
.option('-a, --all', 'setup all functions')
.option('-c, --clean', 'clean legacy setup')
.parse();
Expand Down Expand Up @@ -72,6 +73,25 @@ const functionOptions: {
template?: string;
value: string;
}[] = [
{
description: 'EditorConfig',
path: '.editorconfig',
patterns: ['.editorconfig'],
template: `root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
`,
value: 'editorconfig',
},
{
description: 'Prettier',
field: 'prettier',
Expand Down

0 comments on commit 5759c79

Please sign in to comment.