Skip to content

Commit d0808c7

Browse files
committed
chore: istanbul ignore => c8 ignore
1 parent 9ab4026 commit d0808c7

24 files changed

Lines changed: 40 additions & 38 deletions
File renamed without changes.

‎lib/cli-engine/file-enumerator.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ function statSafeSync(filePath) {
122122
try {
123123
return fs.statSync(filePath);
124124
} catch (error) {
125-
/* istanbul ignore next */
125+
126+
/* c8 ignore next */
126127
if (error.code !== "ENOENT") {
127128
throw error;
128129
}
@@ -141,7 +142,8 @@ function readdirSafeSync(directoryPath) {
141142
try {
142143
return fs.readdirSync(directoryPath, { withFileTypes: true });
143144
} catch (error) {
144-
/* istanbul ignore next */
145+
146+
/* c8 ignore next */
145147
if (error.code !== "ENOENT") {
146148
throw error;
147149
}

‎lib/linter/code-path-analysis/code-path-segment.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class CodePathSegment {
8888
}
8989
});
9090

91-
/* istanbul ignore if */
91+
/* c8 ignore if */
9292
if (debug.enabled) {
9393
this.internal.nodes = [];
9494
}

‎lib/linter/code-path-analysis/code-path-state.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function getContinueContext(state, label) {
5959
context = context.upper;
6060
}
6161

62-
/* istanbul ignore next: foolproof (syntax error) */
62+
/* c8 ignore next: foolproof (syntax error) */
6363
return null;
6464
}
6565

@@ -79,7 +79,7 @@ function getBreakContext(state, label) {
7979
context = context.upper;
8080
}
8181

82-
/* istanbul ignore next: foolproof (syntax error) */
82+
/* c8 ignore next: foolproof (syntax error) */
8383
return null;
8484
}
8585

@@ -433,7 +433,7 @@ class CodePathState {
433433
*/
434434
return context;
435435

436-
/* istanbul ignore next */
436+
/* c8 ignore next */
437437
default:
438438
throw new Error("unreachable");
439439
}
@@ -1030,7 +1030,7 @@ class CodePathState {
10301030
};
10311031
break;
10321032

1033-
/* istanbul ignore next */
1033+
/* c8 ignore next */
10341034
default:
10351035
throw new Error(`unknown type: "${type}"`);
10361036
}
@@ -1095,7 +1095,7 @@ class CodePathState {
10951095
);
10961096
break;
10971097

1098-
/* istanbul ignore next */
1098+
/* c8 ignore next */
10991099
default:
11001100
throw new Error("unreachable");
11011101
}
@@ -1392,7 +1392,7 @@ class CodePathState {
13921392

13931393
const context = getBreakContext(this, label);
13941394

1395-
/* istanbul ignore else: foolproof (syntax error) */
1395+
/* c8 ignore else: foolproof (syntax error) */
13961396
if (context) {
13971397
context.brokenForkContext.add(forkContext.head);
13981398
}
@@ -1417,7 +1417,7 @@ class CodePathState {
14171417

14181418
const context = getContinueContext(this, label);
14191419

1420-
/* istanbul ignore else: foolproof (syntax error) */
1420+
/* c8 ignore else: foolproof (syntax error) */
14211421
if (context) {
14221422
if (context.continueDestSegments) {
14231423
makeLooped(this, forkContext.head, context.continueDestSegments);

‎lib/linter/code-path-analysis/debug-helpers.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const debug = require("debug")("eslint:code-path");
2020
* @param {CodePathSegment} segment A segment to get.
2121
* @returns {string} Id of the segment.
2222
*/
23-
/* istanbul ignore next */
23+
/* c8 ignore next */
2424
function getId(segment) { // eslint-disable-line jsdoc/require-jsdoc -- Ignoring
2525
return segment.id + (segment.reachable ? "" : "!");
2626
}
@@ -67,7 +67,7 @@ module.exports = {
6767
* @param {boolean} leaving A flag whether or not it's leaving
6868
* @returns {void}
6969
*/
70-
dumpState: !debug.enabled ? debug : /* istanbul ignore next */ function(node, state, leaving) {
70+
dumpState: !debug.enabled ? debug : /* c8 ignore next */ function(node, state, leaving) {
7171
for (let i = 0; i < state.currentSegments.length; ++i) {
7272
const segInternal = state.currentSegments[i].internal;
7373

@@ -98,7 +98,7 @@ module.exports = {
9898
* @see http://www.graphviz.org
9999
* @see http://www.webgraphviz.com
100100
*/
101-
dumpDot: !debug.enabled ? debug : /* istanbul ignore next */ function(codePath) {
101+
dumpDot: !debug.enabled ? debug : /* c8 ignore next */ function(codePath) {
102102
let text =
103103
"\n" +
104104
"digraph {\n" +

‎lib/linter/code-path-analysis/id-generator.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class IdGenerator {
3333
next() {
3434
this.n = 1 + this.n | 0;
3535

36-
/* istanbul ignore if */
36+
/* c8 ignore if */
3737
if (this.n < 0) {
3838
this.n = 1;
3939
}

‎lib/linter/timing.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Helpers
1010
//------------------------------------------------------------------------------
1111

12-
/* istanbul ignore next */
12+
/* c8 ignore next */
1313
/**
1414
* Align the string to left
1515
* @param {string} str string to evaluate
@@ -22,7 +22,7 @@ function alignLeft(str, len, ch) {
2222
return str + new Array(len - str.length + 1).join(ch || " ");
2323
}
2424

25-
/* istanbul ignore next */
25+
/* c8 ignore next */
2626
/**
2727
* Align the string to right
2828
* @param {string} str string to evaluate
@@ -64,7 +64,7 @@ function getListSize() {
6464
return TIMING_ENV_VAR_AS_INTEGER > 10 ? TIMING_ENV_VAR_AS_INTEGER : MINIMUM_SIZE;
6565
}
6666

67-
/* istanbul ignore next */
67+
/* c8 ignore next */
6868
/**
6969
* display the data
7070
* @param {Object} data Data object to be displayed
@@ -119,7 +119,7 @@ function display(data) {
119119
console.log(table.join("\n")); // eslint-disable-line no-console -- Debugging function
120120
}
121121

122-
/* istanbul ignore next */
122+
/* c8 ignore next */
123123
module.exports = (function() {
124124

125125
const data = Object.create(null);

‎lib/rules/array-callback-return.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function getArrayMethodName(node) {
125125
}
126126
}
127127

128-
/* istanbul ignore next: unreachable */
128+
/* c8 ignore next: unreachable */
129129
return null;
130130
}
131131

‎lib/rules/global-require.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function findReference(scope, node) {
2828
const references = scope.references.filter(reference => reference.identifier.range[0] === node.range[0] &&
2929
reference.identifier.range[1] === node.range[1]);
3030

31-
/* istanbul ignore else: correctly returns null */
31+
/* c8 ignore else: correctly returns null */
3232
if (references.length === 1) {
3333
return references[0];
3434
}

‎lib/rules/indent-legacy.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const astUtils = require("./utils/ast-utils");
1919
// Rule Definition
2020
//------------------------------------------------------------------------------
2121

22-
/* istanbul ignore next: this rule has known coverage issues, but it's deprecated and shouldn't be updated in the future anyway. */
22+
/* c8 ignore next: this rule has known coverage issues, but it's deprecated and shouldn't be updated in the future anyway. */
2323
/** @type {import('../shared/types').Rule} */
2424
module.exports = {
2525
meta: {
@@ -212,7 +212,7 @@ module.exports = {
212212
if (context.options[0] === "tab") {
213213
indentSize = 1;
214214
indentType = "tab";
215-
} else /* istanbul ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") {
215+
} else /* c8 ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") {
216216
indentSize = context.options[0];
217217
indentType = "space";
218218
}

0 commit comments

Comments
 (0)