This page is not yet available in Spanish. We are working on its translation.
If you have any questions or feedback about our current translation project, feel free to reach out to us!

Metadata

ID: javascript-inclusive/comments

Language: JavaScript

Severity: Notice

Category: Code Style

Description

Check the variable names and suggest better names.

Examples of replacement suggestions:

  • blacklist with denylist
  • whitelist with allowlist
  • master with primary
  • slave with secondary

Non-Compliant Code Examples

/**
 *  whitelist names to prevent unauthorized usage
 */

// she SHE should check her code

// he should check his

Compliant Code Examples

// allowlist names to prevent unauthorized usage

/* the comments do not have a history of issues */
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis