Skip to content

Commit

Permalink
code formatting (cthackers#371)
Browse files Browse the repository at this point in the history
* formatting with "prettier"

* just some code linting

Co-authored-by: 5saviahv <[email protected]>
  • Loading branch information
5saviahv and 5saviahv authored Apr 16, 2021
1 parent 2eec5e0 commit 0a989b1
Show file tree
Hide file tree
Showing 28 changed files with 1,559 additions and 1,511 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

# Set default charset
[*.{js,json,txt,md}]
charset = utf-8
indent_style = space
insert_final_newline = true

[*.{js,md,json}]
trim_trailing_whitespace = true

[*.{js,md}]
indent_size = 4

[*.js]
quote_type = double

[*.{yml,json}]
indent_size = 2
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Enforce Unix newlines in repo
* text=auto eol=lf

*.zip binary
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# keep current manual config
util/constants.js
util/errors.js
18 changes: 18 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "none",
"printWidth": 180,
"bracketSpacing": true,
"endOfLine": "auto",
"useTabs": false,
"semi": true,
"overrides": [
{
"files": ["*.json", "*.yml"],
"options": {
"tabWidth": 2
}
}
]
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: false
language: node_js

node_js:
- 'stable'
- "stable"
- 12
- 10

Expand Down
Loading

0 comments on commit 0a989b1

Please sign in to comment.