8000 Making it Windows compatible · Issue #466 · Quramy/typescript-eslint-language-service · GitHub
[go: up one dir, main page]

Skip to content

Making it Windows compatible #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
artola opened this issue Jun 28, 2022 · 1 comment
Closed

Making it Windows compatible #466

artola opened this issue Jun 28, 2022 · 1 comment

Comments

@artola
Copy link
Contributor
artola commented Jun 28, 2022

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`);
artola added a commit to artola/typescript-eslint-language-service that referenced this issue Jun 28, 2022
@awydler
Copy link
awydler commented Jul 15, 2022

I'm facing the same issue.

Any update? @Quramy

@Quramy Quramy closed this as completed Apr 5, 2023
owlkward pushed a commit to robotics-erlangen/framework that referenced this issue May 9, 2024
It is a known issue that the paths in two places are broken for windows:
Quramy/typescript-eslint-language-service#466
Hopefully this gets fixed at the source, but for now setup.sh patches the
corresponding places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0