diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..57becb87 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/config/editorconfig.config.rc b/config/editorconfig.config.rc new file mode 100644 index 00000000..57becb87 --- /dev/null +++ b/config/editorconfig.config.rc @@ -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 diff --git a/src/config.js b/src/config.js index 8787f39e..b5256f55 100644 --- a/src/config.js +++ b/src/config.js @@ -35,6 +35,7 @@ function wipe_file_cfg(repo) { '.prettierrc.toml', '.prettier.config.js', 'prettier.config.js', + '.editorconfig', ] wipe_cfg_list.map(cfg => { @@ -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])) }