-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
We found that this library works well in posix
(Mac, Unix or using WSL) but it fails when we run it on Windows win32
.
There are a few places that are "sensible" to the path separator (i.e., /
or \\
).
It would be great to enhance it to work seamlessly. If you agree I will create a PR with such changes, here some details:
The function isParserModuleNameValid
is looking for the existence of parserModuleName
, it is used only once as:
isParserModuleNameValid(configFileContent.parser, "@typescript-eslint/parser")
the module could be made system sensible using path.join('@typescript-eslint', 'parser')
.
const p = require.resolve(parserModuleSpecifier); |
if (!isParserModuleNameValid(configFileContent.parser, "@typescript-eslint/parser")) { |
Something similar around these lines:
const fragments = require.resolve("eslint").split("node_modules/eslint"); |
We can fix it using:
const fragments = require.resolve("eslint").split(path.join("node_modules", "eslint"));
path.join(...fragments.slice(0, fragments.length - 1), "node_modules", "eslint", "conf", `${name}.js`);
awydler and andyrooger
Metadata
Metadata
Assignees
Labels
No labels