An eslint-disable-line comment suppresses one or more named ESLint rules for the statement on the same line. Use it when an exception is limited to one statement rather than an entire project or file. section 6.3.1
Suppressing no-debugger for one statement
In src/index.ts, place the directive after the statement that intentionally contains a debugger statement: debugger; // eslint-disable-line no-debugger The rule name restricts the exception to no-debugger. Omitting rule names can disable all linting rules, so name the specific rule whenever possible. section 6.3.1
Listing 6.13 Disabling a rule for a single statement in the index.ts file in the src folder
import { sum } from "./calc.js";
let printMessage = (msg: string): void => console.log(`Message: ${ msg }`);
let message = ("Hello, TypeScript");
printMessage(message);
debugger; // eslint-disable-line no-debugger
let total = sum(100, 200, 300);
console.log(`Total: ${total}`);
View the complete TypeScript listing showing the inline directive in context with imports, typed functions, and subsequent application code. section 6.3.1
