Skip to content

Commit aff1de6

Browse files
committed
feat: add .editorconfig
1 parent f8573e8 commit aff1de6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/cli.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,26 @@ async function main(): Promise<void> {
178178
await writeFile('tslint.json', JSON.stringify(tslintJson, null, 2))
179179
}
180180

181+
console.log('📄 Adding .editorconfig')
182+
await writeFile(
183+
'.editorconfig',
184+
[
185+
'[*]',
186+
'insert_final_newline = true',
187+
'end_of_line = lf',
188+
'charset = utf-8',
189+
'trim_trailing_whitespace = true',
190+
'indent_style = space',
191+
'indent_size = 4',
192+
'',
193+
'[*.{json,js,yml}]',
194+
'indent_size = 2',
195+
'',
196+
'[*.md]',
197+
'trim_trailing_whitespace = false',
198+
].join('\n')
199+
)
200+
181201
console.log('📄 Adding prettier.config.js')
182202
await writeFile('prettier.config.js', "module.exports = require('@sourcegraph/prettierrc')\n")
183203

0 commit comments

Comments
 (0)