environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript 14 const iconName = employee.getRole() === "Manager" ? "users" :
15 employee.getRole() === "Engineer" ? "laptop" :
16 "graduation cap";
17 const item = $("<div>").addClass("item"); 18 const logo = $("<i>").addClass(iconName + " big icon");
19 const content = $("<div>").addClass("content")
20 const header = $("<div>").addClass("header").text(employee.getRole());
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript 15 employee.getRole() === "Engineer" ? "laptop" :
16 "graduation cap";
17 const item = $("<div>").addClass("item");
18 const logo = $("<i>").addClass(iconName + " big icon"); 19 const content = $("<div>").addClass("content")
20 const header = $("<div>").addClass("header").text(employee.getRole());
21 const description = $("<div>").addClass("description").text(employee.getName());
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript 16 "graduation cap";
17 const item = $("<div>").addClass("item");
18 const logo = $("<i>").addClass(iconName + " big icon");
19 const content = $("<div>").addClass("content") 20 const header = $("<div>").addClass("header").text(employee.getRole());
21 const description = $("<div>").addClass("description").text(employee.getName());
22 item.append(logo);
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript 17 const item = $("<div>").addClass("item");
18 const logo = $("<i>").addClass(iconName + " big icon");
19 const content = $("<div>").addClass("content")
20 const header = $("<div>").addClass("header").text(employee.getRole()); 21 const description = $("<div>").addClass("description").text(employee.getName());
22 item.append(logo);
23 item.append(content);
environment
array of .deepsource.toml
. Read more in our documentation https://deepsource.io/docs/analyzer/javascript 18 const logo = $("<i>").addClass(iconName + " big icon");
19 const content = $("<div>").addClass("content")
20 const header = $("<div>").addClass("header").text(employee.getRole());
21 const description = $("<div>").addClass("description").text(employee.getName()); 22 item.append(logo);
23 item.append(content);
24 content.append(header);
Variables that aren't defined, but accessed may throw reference errors at runtime.
NOTE: In browser applications, DeepSource recommends the use of ESModules over regular
text/javascript
scripts. Using variables that are injected by scripts included in an HTML file is currently not supported.
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 ESLint 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(); // `someFunction` is not defined
const bar = baz + 1; // 'baz' is undeclared
import { someFunction } from 'some-file';
const baz = Math.random();
const foo = someFunction();
const bar = baz + 1;