Skip to content

Commit 5ba3bdf

Browse files
committed
Add code formatting and linting configurations***
1 parent ec1d82c commit 5ba3bdf

File tree

6 files changed

+1822
-73
lines changed

6 files changed

+1822
-73
lines changed

Diff for: .editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

Diff for: .eslintrc.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"extends": ["xo", "prettier"],
6+
"parserOptions": {
7+
"ecmaVersion": 2020,
8+
"sourceType": "module"
9+
},
10+
"rules": {
11+
"prettier/prettier": "error",
12+
"one-var": "off",
13+
"max-params": ["error", 5],
14+
"arrow-body-style": ["error", "always"],
15+
"radix": "off",
16+
"no-unused-expressions": ["error", { "allowTernary": true }],
17+
"curly": "error",
18+
"new-cap": "off",
19+
"no-return-assign": "off",
20+
"no-await-in-loop": "off"
21+
},
22+
"plugins": ["prettier"]
23+
}

Diff for: .prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bot_sessions/

Diff for: .prettierrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"endOfLine": "lf",
6+
"semi": false,
7+
"singleQuote": true,
8+
"overrides": [
9+
{
10+
"files": "*.json",
11+
"options": {
12+
"tabWidth": 2
13+
}
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)