Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

fix busted lint-staged config

Christopher Hiller7613521a8d38
diff --git a/.lintstagedrc.json b/.lintstagedrc.json
new file mode 100644
index 00000000..19b7946f
--- /dev/null
+++ b/.lintstagedrc.json
@@ -0,0 +1,12 @@
+{
+ "linters": {
+ "(bin/*|**/*.js)": [
+ "prettier-eslint --write",
+ "git add"
+ ]
+ },
+ "ignore": [
+ "docs/**/*.js",
+ "test/**/*.fixture.js"
+ ]
+}
diff --git a/package.json b/package.json
index bccad95b..1c40ba51 100644
--- a/package.json
+++ b/package.json
@@ -454,7 +454,8 @@
"scripts": {
"prepublishOnly": "nps test clean build",
"start": "nps",
- "test": "nps test"
+ "test": "nps test",
+ "precommit": "lint-staged"
},
"dependencies": {
"browser-stdout": "1.3.1",
@@ -527,12 +528,6 @@
},
"homepage": "https://mochajs.org",
"logo": "https://cldup.com/S9uQ-cOLYz.svg",
- "lint-staged": {
- "*.js": [
- "prettier-eslint --write",
- "git add"
- ]
- },
"prettier": {
"singleQuote": true,
"bracketSpacing": false