Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update jsdoccomment, surface export default fix; fixes #810 #811

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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