Skip to content
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

[Bug] No linting for .ts and .tsx files when using vue-eslint-parser #1266

Closed
wenfangdu opened this issue May 21, 2021 · 10 comments
Closed

[Bug] No linting for .ts and .tsx files when using vue-eslint-parser #1266

wenfangdu opened this issue May 21, 2021 · 10 comments
Labels
info-needed Issue requires more information from poster

Comments

@wenfangdu
Copy link

wenfangdu commented May 21, 2021

Quote from README.md:

The 2.0.4 version of the extension contains the following major improvements:

Improved TypeScript detection - As soon as TypeScript is correctly configured inside ESLint, you no longer need additional configuration through VS Code's eslint.validate setting. The same is true for HTML and Vue.js files.

Therefore, my config:

{
  "eslint.validate": []
}

Repro: https://github.com/wenfangdu/vue-eslint-parser-repro

Seems when using vue-eslint-parser, .ts and .tsx files aren't auto-detected unless I explicitly specify:

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ]
}
@dbaeumer
Copy link
Member

This is actually by design since I didn't want to break existing users. You should simply remove the setting since it is not necessary for your setup anymore.

Let me know if everything works as expected when the setting is removed.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label May 21, 2021
@wenfangdu
Copy link
Author

wenfangdu commented May 21, 2021

@dbaeumer Please pardon me if I'm wrong, I think you misunderstood the issue. My previous config "eslint.validate": [] (which is the default, I didn't manually add it) caused .ts and .tsx not being linted, only after using the following config, the linting took effect.

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ]
}

You can try my repro with the default "eslint.validate": [] and see if linting is on.

@dbaeumer
Copy link
Member

dbaeumer commented Jun 1, 2021

I cloned the repository as is and it works for me out of the box

capture

@dbaeumer
Copy link
Member

dbaeumer commented Jun 1, 2021

Any additional steps?

@wenfangdu
Copy link
Author

@dbaeumer No, there's none. It's quite strange, I'm using the following as a workaround now, no problems so far:

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ]
}

@dbaeumer
Copy link
Member

dbaeumer commented Jun 2, 2021

That is really strange since it works for me without the eslint.validate setting.

@baranelitez
Copy link

@wenfangdu are you using windows by any chance? if so, can you try the same repo in another windows computer along with linux/osx? My findings are that it fails without that validate options if you use windows, whereas in linux/OSX, it works out of the box.

@wenfangdu
Copy link
Author

@wenfangdu are you using windows by any chance? if so, can you try the same repo in another windows computer along with Linux/OSX? My findings are that it fails without that validate options if you use windows, whereas, in Linux/OSX, it works out of the box.

@baranelitez Yes, I'm using Windows 10.

@dbaeumer I think this might be the reason?

@wenfangdu
Copy link
Author

@dbaeumer Sorry to bother 🙏, is it released? It's still reproducible for me.

@dbaeumer
Copy link
Member

Only has a new insider here: https://github.com/microsoft/vscode-eslint/releases/tag/release%2F2.1.24-Insider

If you want to give it a try you can download the VSIX and install using the Install from VSIX command in VS Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants