MDL-54939 eslint: tweak rules
authorDan Poltawski <dan@moodle.com>
Thu, 16 Jun 2016 18:20:08 +0000 (19:20 +0100)
committerDan Poltawski <dan@moodle.com>
Thu, 16 Jun 2016 18:33:00 +0000 (19:33 +0100)
1) Allow jsdoc descriptions to be empty. I think that matches our phpdoc
checker, and I think its probably better than me filling the
descriptions in poorly.

2) For the captilisation rules, don't apply to object properties (this
is because jQuery has lots of violators of this rule)

.eslintrc

index 31bd8ab..03dc85a 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -40,7 +40,7 @@
     'no-unreachable': 'warn',
     'no-unsafe-finally': 'error',
     'use-isnan': 'error',
-    'valid-jsdoc': ['warn', { 'requireReturn': false }],
+    'valid-jsdoc': ['warn', { 'requireReturn': false, 'requireParamDescription': false, 'requireReturnDescription': false }],
     'valid-typeof': 'error',
 
     // === Best Practices ===
     'max-params': 'off',
     'max-statements': 'off',
     'max-statements-per-line': 'off',
-    'new-cap': 'warn',
+    'new-cap': ['warn', { 'properties': false }],
     'new-parens': 'warn',
     'newline-after-var': 'off',
     'newline-before-return': 'off',