Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 816 Bytes

12-linter-and-coverage.md

File metadata and controls

34 lines (26 loc) · 816 Bytes

Disabling an eslint rule

Disabling an eslint rule MUST remains exceptional and MUST always be done one rule at a time. The "disable" comment MUST always be preceded by a justification which explains why the rule SHOULD be disabled in this particular context.

/**
 * 😍 Cool 😍
 */

const {
  // oidc spec defined property
  // eslint-disable-next-line @typescript-eslint/naming-convention
  given_name,
  // oidc spec defined property
  // eslint-disable-next-line @typescript-eslint/naming-convention
  family_name,
} = userinfos;
/**
 * 😱 Not cool 😱
 */

/* eslint-disable @typescript-eslint/naming-convention */

const { given_name, family_name } = userinfos;

/* ... */

/* eslint-disable */
const { given_name, family_name } = userinfos;
/* eslint-enable */