Skip to content

Commit bac835d

Browse files
committed
build: add RE_DECLARE_CONST check for function-type exports
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent f49428b commit bac835d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/tsdoc-declarations-doctest/lib/add_package_to_scope.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ function addPackageToScope( scope, pkg, sourceText ) {
6464

6565
pkgType = typeof pkg;
6666
if ( pkgType === 'function' ) {
67-
match = sourceText.match( RE_DECLARE_FUNCTION ) || sourceText.match( RE_DECLARE_VAR ) || sourceText.match( RE_DECLARE_CLASS ); // eslint-disable-line max-len
67+
match = sourceText.match( RE_DECLARE_FUNCTION ) ||
68+
sourceText.match( RE_DECLARE_VAR ) ||
69+
sourceText.match( RE_DECLARE_CLASS ) ||
70+
sourceText.match( RE_DECLARE_CONST );
6871
if ( match ) {
6972
scope[ match[1] ] = pkg;
7073
}

0 commit comments

Comments
 (0)