environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript68}
69
70function scrollActiveToc() {
71 var active = $('nav#toc a.active').get(0);72 if (active) {
73 active.scrollIntoView({ block: 'center' });
74 }
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript64}
65
66function queryShow() {
67 $('#search-hits').show(200);68}
69
70function scrollActiveToc() {
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript60}
61
62function queryClose() {
63 window.setTimeout(function () { $('#search-hits').hide(200); }, 500);64}
65
66function queryShow() {
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript54}
55
56function queryChange() {
57 if ($('#search-query').val() != '') {58 queryShow();
59 }
60}
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript44 addHeadingAnchors();
45 var anchor = href.split('#')[1];
46 if (anchor) {
47 var anchorlink = $(`main a[href="#${anchor}"]`).get(0)48 if (anchorlink) {
49 anchorlink.scrollIntoView({ behavior: 'smooth', block: 'start' });
50 }
Variables that aren't defined, but accessed may throw reference errors at runtime.
Potential ReferenceError
s may result from misspellings of variable and parameter names, or accidental implicit globals (for example, forgetting the var
keyword in a for
loop initializer).
Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/
comment, or specified in the globals key in the configuration file.
A common use case for these is if you intentionally use globals that are defined elsewhere (e.g. in a script sourced from HTML).
const foo = someFunction();
const bar = a + 1; // 'a' is undeclared
/*global someFunction, a*/
/*eslint no-undef: "error"*/
const foo = someFunction();
const bar = a + 1;