Skip to content

Commit ac5b598

Browse files
committed
add editor, eslint and prettier config
1 parent 45d79b9 commit ac5b598

File tree

6 files changed

+60
-20
lines changed

6 files changed

+60
-20
lines changed

.editorconfig

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

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.js

-19
This file was deleted.

.eslintrc.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"commonjs": true,
6+
"es6": true,
7+
"node": true
8+
},
9+
"extends": ["standard", "prettier", "prettier/standard"],
10+
"parserOptions": {
11+
"ecmaVersion": 2017,
12+
"sourceType": "module"
13+
},
14+
"plugins": ["prettier", "standard"],
15+
"rules": {
16+
"no-useless-constructor": 0,
17+
"no-new": 0,
18+
"standard/no-callback-literal": 0,
19+
"prettier/prettier": "error",
20+
"indent": [
21+
"error",
22+
4,
23+
{
24+
"SwitchCase": 1
25+
}
26+
],
27+
"linebreak-style": ["error", "unix"],
28+
"quotes": [
29+
"error",
30+
"single",
31+
{
32+
"avoidEscape": true
33+
}
34+
],
35+
"semi": ["error", "always"]
36+
}
37+
}

.prettierrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": false,
9+
"arrowParens": "always",
10+
"proseWrap": "never"
11+
}

index.js

-1
This file was deleted.

0 commit comments

Comments
 (0)