Skip to content

Commit

Permalink
Add EditorConfig to preserve code style
Browse files Browse the repository at this point in the history
Signed-off-by: Bayu Satiyo <[email protected]>
  • Loading branch information
kiraio-moe committed Dec 7, 2023
1 parent 8b324d5 commit 7e54a12
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# VS Code user, install: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
# Sublime Text user, install: https://github.com/sindresorhus/editorconfig-sublime#readme
# See https://editorconfig.org/ for more information.

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true

[*.md]
indent_size = 2
trim_trailing_whitespace = false
7 changes: 5 additions & 2 deletions docs/CODE_STYLE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
### Code style:

- [Standard JS](https://standardjs.com/rules.html) + [Prettier](https://prettier.io/)
- Unix EOL (LF)
- Newline at end of file

### How to set this up on VScode/Codium:
- Extension: [VSCode marketplace](https://marketplace.visualstudio.com/items?itemName=numso.prettier-standard-vscode)
- Newline at end of file: [stackoverflow.com/a/44704969](https://stackoverflow.com/a/44704969)

Install these extensions:
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig "See on Visual Studio Code Marketplace")
- [Prettier-Standard - JavaScript formatter](https://marketplace.visualstudio.com/items?itemName=numso.prettier-standard-vscode "See on Visual Studio Code Marketplace")

0 comments on commit 7e54a12

Please sign in to comment.