Skip to content

Commit

Permalink
Blocks: Remove require-jsdoc eslint rule (#251)
Browse files Browse the repository at this point in the history
Adding valid jsdoc comments to components (and each method in each component) is more noise than benefit. These are usually overly-generic and the components are just as understandable without them. We can trust a developer's best judgement for whether a function needs documentation, and the `valid-jsdoc` rule will still kick in to check the formatting.
  • Loading branch information
ryelle authored Oct 11, 2019
1 parent f0812ab commit d5c24f8
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions public_html/wp-content/mu-plugins/blocks/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,6 @@ module.exports = {
ignoreStateless: true
} ],

/*
* A short description often makes a function easier to understand, and also provides a nice visual
* delineation between functions.
*
* Given that closures should be short and contextually relevant, requiring documentation for them would
* likely hurt readability more than it would help clarity.
*/
'require-jsdoc': [ 'error', {
'require': {
'FunctionDeclaration' : true,
'MethodDefinition' : true,
'ClassDeclaration' : true,
'ArrowFunctionExpression' : false,
'FunctionExpression' : true
}
} ],

/*
* Sort imports alphabetically, at least inside multiple-member imports. Ignores declaration sorting since
* this interfers with the External/WordPress/Internal groupings. For example, it will flag the following
Expand Down

0 comments on commit d5c24f8

Please sign in to comment.