Skip to content

Commit 5cbb2db

Browse files
committed
fix(linter): update EOL based on comment
1 parent af3f9ac commit 5cbb2db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/eslint/src/generators/convert-to-flat-config/converters/json-converter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
} from '../../utils/flat-config/ast-utils';
1313
import { getPluginImport } from '../../utils/eslint-file';
1414
import { mapFilePath } from '../../utils/flat-config/path-utils';
15-
import { EOL } from 'node:os';
1615

1716
/**
1817
* Converts an ESLint JSON config to a flat config.
@@ -186,7 +185,7 @@ export function convertEslintJsonToFlatConfig(
186185
if (tree.exists(ignorePath)) {
187186
const patterns = tree
188187
.read(ignorePath, 'utf-8')
189-
.split(EOL)
188+
.split(/\r\n|\r|\n/)
190189
.filter((line) => line.length > 0 && line !== 'node_modules')
191190
.map((path) => mapFilePath(path));
192191
if (patterns.length > 0) {

0 commit comments

Comments
 (0)