mozilla / observatory-cli

Mozilla Public License 2.0
187 stars 24 forks source link

Tweak ESLint rules and autofix errors #16

Closed pdehaan closed 7 years ago

pdehaan commented 7 years ago

DISCLAIMER: I didn't bump your package.json version number.

pdehaan commented 7 years ago

Other [future] optimizations could be adding the following ESLint plugins:

"eslint-plugin-node": "^2.1.1",
"eslint-plugin-promise": "^2.0.1",

Then we can add the following rules:

--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -5,10 +5,22 @@ env:

 extends:
   - eslint:recommended
+  - plugin:node/recommended
+
+plugins:
+  - node
+  - promise

 root: true

 rules:
+  node/no-unpublished-bin: error
+
+  promise/param-names: error
+  promise/always-return: error
+  promise/catch-or-return: error
+  promise/no-native: off
+
   comma-dangle: off
   curly: warn
   eol-last: error