Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

[Toolbox] Format lint run #1356

Closed
jasonLaster opened this issue Nov 30, 2016 · 2 comments
Closed

[Toolbox] Format lint run #1356

jasonLaster opened this issue Nov 30, 2016 · 2 comments
Assignees

Comments

@jasonLaster
Copy link
Contributor

From @kdzwinel

my PR failed linting - that was a surprise to me because I saw there is a hook that runs tests before git push - not only it allowed me to push with linting errors, but it also hid them from me by allowing unit tests to run despite linting errors (last output in the terminal was a green checkmark coming from unit tests)

@jasonLaster
Copy link
Contributor Author

Ideas:

  • fail if any of the lints fail
  • make a snazzy node script that makes it clear what will run and afterwards what the results were

@jasonLaster
Copy link
Contributor Author

here's a patch to get started:

diff --git a/bin/lint.js b/bin/lint.js
new file mode 100644
index 0000000..19a97ad
--- /dev/null
+++ b/bin/lint.js
@@ -0,0 +1,5 @@
+const ps = require("child_process");
+
+
+ps.execSync("npm run lint-css -s;")
+ps.execSync("npm run lint-js -s")
diff --git a/package.json b/package.json
index 655bd69..689ef37 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
     "start": "node bin/dev-server",
     "start-app": "TARGET=application node bin/dev-server",
     "flow": "flow",
-    "lint": "npm run lint-css -s; npm run lint-js -s",
+    "lint": "node bin/lint",
     "lint-css": "stylelint src/components/*.css",
     "lint-js": "eslint src/**/*.js",
     "lint-fix": "npm run lint-js -- --fix",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants