目录

@typescript-eslint/triple-slash-reference

Disallow certain triple slash directives in favor of ES6-style import declarations.

This rule reports errors on the use of the following triple slash directives:

/// <reference lib="..." />
/// <reference path="..." /> 
/// <reference types="..." />

Rule Configuration

// code-linter.json5
{
  "rules": {
    "@typescript-eslint/triple-slash-reference": "error"
  }
}

Options

For details, see @typescript-eslint/triple-slash-reference.

Example of Correct Code

import { value } from 'code';
export { value };

Example of Incorrect Code

/// <reference path="code" />

globalThis.value;

Rule Set

plugin:@typescript-eslint/all

For details about how to configure Code Linter check rules, see Code Linter.