Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

working proposal for autofix based on eslint example #47

Merged
merged 13 commits into from
May 24, 2016
Merged

working proposal for autofix based on eslint example #47

merged 13 commits into from
May 24, 2016

Conversation

rlasjunies
Copy link

Hi @egamma,

As proposed here is the PR for tslint autofix.

  • it's based on eslint autofix proposal
  • autofix rules are stored in a dedicated file: tslintautofix.ts (7 autofix for now, willing to increase)

Work pretty fine for now.

Let me know your feeling.

BR

@egamma
Copy link
Member

egamma commented Apr 25, 2016

@rlasjunies thanks, I took a quick look at the code and it looks promising. I need more time for a deeper look.

I think we would get more quick fixes if the tslintautofix.ts becomes part of tslint, the way you wrote the code it is independent of VS Code. @unional, @jkillian what do you think?

@jkillian
Copy link

jkillian commented Apr 25, 2016

Hi all, auto-fixing problems is a feature that we'd like to have in TSLint, although as far as I know, there's been no implementation work on it (outside of this anyways). It would probably be best to have a short proposal written up there documenting what sort of API a feature like this would have and basic implementation ideas over in palantir/tslint#561

@egamma
Copy link
Member

egamma commented Apr 26, 2016

@jkillian makes sense to start with an API proposal.
Since VS Code integrates several linters it would be desirable when the different linters use a similar API for auto fixing. I therefore suggest to also consider the ESlint as a source for inspiration.

@rlasjunies do you have the cycles for this? we could also involve @dbaeumer given his autofix work for eslint.

I'll still look into make this PR available in the tslint extension so that we get feedback from users on the auto fix UI support.

@rlasjunies
Copy link
Author

Hi @egamma, @jkillian,

I'll will have a look in the TSLint API, digest and hopefully propose something ;-)

This week will be hard ... beginning of May I'll be back to you.

@rlasjunies rlasjunies closed this Apr 26, 2016
@egamma
Copy link
Member

egamma commented Apr 26, 2016

@rlasjunies I'll reopen since I still want to look into it and will try to make it available as is so that we get feedback from users. This is independent of whether the autofixes come from tslint or here.

@egamma egamma reopened this Apr 26, 2016
@egamma egamma merged commit 7289287 into microsoft:master May 24, 2016
@egamma
Copy link
Member

egamma commented May 24, 2016

The PR looks good, thanks @rlasjunies !

@ericanderson
Copy link
Contributor

This was announced in today's update for VSC, but doesn't seem to be shipped?

@egamma
Copy link
Member

egamma commented Jun 6, 2016

Thanks for the reminder. Published the version as 0.5.25.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants