Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Fix code that should open new files in create-rule script #820

Closed
IllusionMH opened this issue Feb 13, 2019 · 1 comment
Closed

Fix code that should open new files in create-rule script #820

IllusionMH opened this issue Feb 13, 2019 · 1 comment
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Tooling Repository tasks around improving source tooling. Good First Issue 🙌 Howdy, neighbor! Status: Accepting PRs

Comments

@IllusionMH
Copy link
Contributor

Feature request

Is your feature request that we implement a new rule?
No

Is your feature request related to a problem? Please describe.
As was mentioned in #817 - create-rule doesn't open newly created files because VSCODE_CWD in no longer available in terminals opened from VS Code. Instead it is better to check TERM_PROGRAM which was added for this purpose (I think) microsoft/vscode@9c82ae8

Describe the solution you'd like

  1. Replace check for VSCODE_CWD with check if TERM_PROGRAM is vscode instead.
  2. Use flag -g (or --goto) to call VS Code with list of files, instead of separate calls that are much slower (on my machine)
  3. Move path with line to README.md to the first argument (this is the only way to make VS Code to respect :line )

Describe alternatives you've considered
Remove code that opened files, but it doesn't looks great if it can be fixed.

Additional context
No.

@IllusionMH IllusionMH added Status: Accepting PRs Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Tooling Repository tasks around improving source tooling. Good First Issue 🙌 Howdy, neighbor! labels Feb 13, 2019
@JoshuaKGoldberg
Copy link

☠️ It's time! ☠️

Per #876, this repository is no longer accepting feature pull requests. TSLint is being deprecated and we recommend you switch to https://typescript-eslint.io.

Thanks for open sourcing with us, everyone!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Tooling Repository tasks around improving source tooling. Good First Issue 🙌 Howdy, neighbor! Status: Accepting PRs
Projects
None yet
Development

No branches or pull requests

2 participants