Skip to content

Commit

Permalink
feat: update jsdoccomment, surface export default fix; fixes #810
Browse files Browse the repository at this point in the history
Also updates devDeps
  • Loading branch information
brettz9 committed Dec 9, 2021
1 parent ecd1c72 commit f04a444
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -12982,6 +12982,10 @@ export class InovaAutoCompleteComponent {
}
// "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["PropertyDefinition"],"publicOnly":true}]
// Message: Missing JSDoc comment.

export default (arg) => arg;
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":true,"require":{"ArrowFunctionExpression":true,"ClassDeclaration":true,"ClassExpression":true,"FunctionDeclaration":true,"FunctionExpression":true,"MethodDefinition":true}}]
// Message: Missing JSDoc comment.
````

The following patterns are not considered problems:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -5,7 +5,7 @@
"url": "http://gajus.com"
},
"dependencies": {
"@es-joy/jsdoccomment": "0.12.0",
"@es-joy/jsdoccomment": "0.13.0",
"comment-parser": "1.3.0",
"debug": "^4.3.3",
"escape-string-regexp": "^4.0.0",
Expand All @@ -26,15 +26,15 @@
"@babel/preset-env": "^7.16.4",
"@babel/register": "^7.16.0",
"@hkdobrev/run-if-changed": "^0.3.1",
"@typescript-eslint/parser": "^5.5.0",
"@typescript-eslint/parser": "^5.6.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-istanbul": "^6.1.1",
"camelcase": "^6.2.1",
"chai": "^4.3.4",
"cross-env": "^7.0.3",
"decamelize": "^5.0.1",
"eslint": "^8.3.0",
"eslint-config-canonical": "^32.43.0",
"eslint": "^8.4.1",
"eslint-config-canonical": "^32.46.0",
"gitdown": "^3.1.4",
"glob": "^7.2.0",
"husky": "^7.0.4",
Expand Down
39 changes: 35 additions & 4 deletions test/rules/assertions/requireJsdoc.js
Expand Up @@ -595,10 +595,10 @@ function quux (foo) {
},
}],
output: `
export default /**
/**
*
*/
() => {}
export default () => {}
`,
parserOptions: {
sourceType: 'module',
Expand Down Expand Up @@ -626,10 +626,10 @@ function quux (foo) {
},
}],
output: `
export default (/**
/**
*
*/
function () {})
export default (function () {})
`,
parserOptions: {
sourceType: 'module',
Expand Down Expand Up @@ -3281,6 +3281,37 @@ function quux (foo) {
sourceType: 'module',
},
},
{
code: `
export default (arg) => arg;
`,
errors: [
{
line: 2,
message: 'Missing JSDoc comment.',
},
],
options: [{
publicOnly: true,
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
FunctionExpression: true,
MethodDefinition: true,
},
}],
output: `
/**
*
*/
export default (arg) => arg;
`,
parserOptions: {
sourceType: 'module',
},
},
],
valid: [{
code: `
Expand Down

0 comments on commit f04a444

Please sign in to comment.