Skip to content

Commit

Permalink
feat: add editorconfig (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay authored and varl committed Feb 8, 2019
1 parent 37fe287 commit 8b0c392
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# https://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
16 changes: 16 additions & 0 deletions config/editorconfig.config.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# https://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function wipe_file_cfg(repo) {
'.prettierrc.toml',
'.prettier.config.js',
'prettier.config.js',
'.editorconfig',
]

wipe_cfg_list.map(cfg => {
Expand Down Expand Up @@ -75,6 +76,10 @@ function configure(repo) {
path.join(__dirname, '../config/browserslist.config.rc'),
path.join(repo, '.browserslistrc'),
],
[
path.join(__dirname, '../config/editorconfig.config.rc'),
path.join(repo, '.editorconfig'),
],
].map(cfg => copy(cfg[0], cfg[1]))
}

Expand Down

0 comments on commit 8b0c392

Please sign in to comment.