Skip to content

Commit 21c4a4b

Browse files
Copilotalexr00
andcommitted
Add 'effect' to JSDOC_NON_USERS exclusion list and add test
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 7c15e5f commit 21c4a4b

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/common/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
export const ALLOWED_USERS = `[a-zA-Z0-9-]+`;
88

99
// https://jsdoc.app/index.html
10-
export const JSDOC_NON_USERS = ['abstract', 'virtual', 'access', 'alias', 'async', 'augments', 'extends', 'author', 'borrows', 'callback', 'class', 'constructor', 'classdesc', 'constant', 'const', 'constructs', 'copyright', 'default', 'defaultvalue', 'deprecated', 'description', 'desc', 'enum', 'event', 'example', 'exports', 'external', 'host', 'file', 'fileoverview', 'overview', 'fires', 'emits', 'function', 'func', 'method', 'generator', 'global', 'hideconstructor', 'ignore', 'implements', 'inheritdoc', 'inner', 'instance', 'interface', 'kind', 'lends', 'license', 'listens', 'member', 'var', 'memberof', 'mixes', 'mixin', 'module', 'name', 'namespace', 'override', 'package', 'param', 'arg', 'argument', 'private', 'property', 'prop', 'protected', 'public', 'readonly', 'requires', 'returns', 'return', 'see', 'since', 'static', 'summary', 'this', 'throws', 'exception', 'todo', 'tutorial', 'type', 'typedef', 'variation', 'version', 'yields', 'yield', 'link'];
10+
export const JSDOC_NON_USERS = ['abstract', 'virtual', 'access', 'alias', 'async', 'augments', 'extends', 'author', 'borrows', 'callback', 'class', 'constructor', 'classdesc', 'constant', 'const', 'constructs', 'copyright', 'default', 'defaultvalue', 'deprecated', 'description', 'desc', 'effect', 'enum', 'event', 'example', 'exports', 'external', 'host', 'file', 'fileoverview', 'overview', 'fires', 'emits', 'function', 'func', 'method', 'generator', 'global', 'hideconstructor', 'ignore', 'implements', 'inheritdoc', 'inner', 'instance', 'interface', 'kind', 'lends', 'license', 'listens', 'member', 'var', 'memberof', 'mixes', 'mixin', 'module', 'name', 'namespace', 'override', 'package', 'param', 'arg', 'argument', 'private', 'property', 'prop', 'protected', 'public', 'readonly', 'requires', 'returns', 'return', 'see', 'since', 'static', 'summary', 'this', 'throws', 'exception', 'todo', 'tutorial', 'type', 'typedef', 'variation', 'version', 'yields', 'yield', 'link'];
1111

1212
// https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md
1313
export const PHPDOC_NON_USERS = ['api', 'author', 'copyright', 'deprecated', 'generated', 'internal', 'link', 'method', 'package', 'param', 'property', 'return', 'see', 'since', 'throws', 'todo', 'uses', 'var', 'version'];

src/test/common/user.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import { default as assert } from 'assert';
7+
import { JSDOC_NON_USERS } from '../../common/user';
8+
9+
describe('User utilities', function () {
10+
it('JSDOC_NON_USERS includes effect', function () {
11+
assert(JSDOC_NON_USERS.includes('effect'), 'JSDOC_NON_USERS should include "effect"');
12+
});
13+
14+
it('JSDOC_NON_USERS includes common tags', function () {
15+
// Verify a few common tags are in the list
16+
assert(JSDOC_NON_USERS.includes('param'), 'JSDOC_NON_USERS should include "param"');
17+
assert(JSDOC_NON_USERS.includes('returns'), 'JSDOC_NON_USERS should include "returns"');
18+
assert(JSDOC_NON_USERS.includes('deprecated'), 'JSDOC_NON_USERS should include "deprecated"');
19+
});
20+
});

0 commit comments

Comments
 (0)