From 0d06a20038027adfb6dbb68c76fff91542e2303f Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 16 Jun 2016 19:20:08 +0100 Subject: [PATCH] MDL-54939 eslint: tweak rules 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 31bd8ab307e..03dc85aa6e0 100644 --- 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 === @@ -115,7 +115,7 @@ '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',