diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8a6f796 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[package.json] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[*.js] +curly_bracket_next_line = false diff --git a/README.md b/README.md index a19c88b..d82c5fe 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ 1. [ES5 Compatibility](#es5) 1. [Testing](#testing) 1. [Performance](#performance) + 1. [Editorconfig Setup / Use](#editorconfig) 1. [Resources](#resources) 1. [In the Wild](#in-the-wild) 1. [The JavaScript Style Guide Guide](#guide-guide) @@ -1195,6 +1196,22 @@ - Loading... **[[⬆]](#TOC)** + +## Editorconfig Setup / Use + - Usually for a project with more than one developer involved, it is essentially important for the project to define + and maintain a consistent coding style. Most code editors and IDEs, such as Vim, Emacs, Code::Blocks, provide settings + related to coding styles, such as the width of tab, the size of indentation, end of line, etc. However, it is hard to + provide the same settings for different Editors and IDEs: we have to maintain many config files for different editors + and IDEs, such as .vimrc for Vim, .emacs for Emacs. In order to solve this, EditorConfig was born. By defining coding + style in files named .editorconfig, the EditorConfig plugins for different editors and IDEs will automatically adjust + your coding style. + - To use EditorConfig, you have to download the corresponding [EditorConfig plugins](http://editorconfig.org/#download) for your Editor or IDE. + Follow the installation instructions to install them. + - The "base" .editorconfig file goes in the root directory. You can have other config files in specific folders if wanted. + The only difference would be at the top of the file to remove root = true from any file that isn't the root. + + + **[[⬆]](#TOC)** ## Resources diff --git a/linters/webstorm-settings.jar b/linters/webstorm-settings.jar new file mode 100644 index 0000000..8765523 Binary files /dev/null and b/linters/webstorm-settings.jar differ