We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SourceCode#getText
range
1 parent 6e52bbd commit 230d996Copy full SHA for 230d996
apps/oxlint/src-js/plugins/source_code.ts
@@ -149,7 +149,8 @@ export const SOURCE_CODE = Object.freeze({
149
if (!node) return sourceText;
150
151
// ESLint ignores falsy values for `beforeCount` and `afterCount`
152
- let { start, end } = node;
+ const { range } = node;
153
+ let start = range[0], end = range[1];
154
if (beforeCount) start = max(start - beforeCount, 0);
155
if (afterCount) end += afterCount;
156
return sourceText.slice(start, end);
0 commit comments