Skip to content

Commit c7f9cfe

Browse files
committed
Split out configs from package.json
1 parent 81ca07a commit c7f9cfe

File tree

5 files changed

+22
-30
lines changed

5 files changed

+22
-30
lines changed

.eslintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es6": true,
5+
"mocha": true
6+
},
7+
"extends": ["plugin:prettier/recommended"]
8+
}

.huskyrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "lint-staged"
4+
}
5+
}

.lintstagedrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.js": ["eslint --fix", "git add"],
3+
"*.{json,md,yml}": ["prettier --write", "git add"]
4+
}

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 4,
4+
"trailingComma": "es5"
5+
}

package.json

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,5 @@
2121
"mocha": "^5.1.0",
2222
"prettier": "^1.14.3",
2323
"prettier-eslint": "^8.8.2"
24-
},
25-
"eslintConfig": {
26-
"env": {
27-
"node": true,
28-
"es6": true,
29-
"mocha": true
30-
},
31-
"extends": [
32-
"plugin:prettier/recommended"
33-
]
34-
},
35-
"husky": {
36-
"hooks": {
37-
"pre-commit": "lint-staged"
38-
}
39-
},
40-
"lint-staged": {
41-
"*.js": [
42-
"eslint --fix",
43-
"git add"
44-
],
45-
"*.{json,md,yml}": [
46-
"prettier --write",
47-
"git add"
48-
]
49-
},
50-
"prettier": {
51-
"singleQuote": true,
52-
"tabWidth": 4,
53-
"trailingComma": "es5"
5424
}
5525
}

0 commit comments

Comments
 (0)