-
- Notifications
You must be signed in to change notification settings - Fork 31
Adding Format On Save Option (#6) #24
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
Conversation
The new feature for searching for local prettier versions was merged, but readme wasn't updated
| Sorry, I rarely use git and need to google how to squash my commits before sending a PR |
| No comments? |
| Hi Tom I will try to look into it tomorrow. I’m not the extension expert - so the thing about the kosher thing is properly Mads’es call - but if it looks good to me then let’s just merge it - and then maybe mads can look at it when he got the time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some code that looks unused.
Other than that it looks good to me - although I have no idea about the actual "Format on Save" thing.
About the squash thingy. I can squash it into a single commit - and then you will be the author. (Its part of Githubs Merge Powers)
src/NodeProcess.cs Outdated
| | ||
| private static string _installDir = Path.Combine(Path.GetTempPath(), Vsix.Name, Packages.GetHashCode().ToString()); | ||
| private static readonly string _executable = Path.Combine(_installDir, "node_modules\\.bin\\prettier.cmd"); | ||
| private static readonly string[] _supportedExtensionRegexes = new string[] { ".jsx?", ".tsx?" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use this anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh.. I thought I had removed that change. That's for adding tslint support (another issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops.. thought I had removed that. I'll update
src/NodeProcess.cs Outdated
| private static string _installDir = Path.Combine(Path.GetTempPath(), Vsix.Name, Packages.GetHashCode().ToString()); | ||
| private static readonly string _executable = Path.Combine(_installDir, "node_modules\\.bin\\prettier.cmd"); | ||
| private static readonly string[] _supportedExtensionRegexes = new string[] { ".jsx?", ".tsx?" }; | ||
| private static readonly IDictionary<string, string> _specificExtensionCommandMap = new Dictionary<string, string> // TODO: better name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use this anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing..
| So, I removed that unused code, so this should be good to go unless there are other issues |
| I’ve merged it. Good work 👍 |
This addresses #6
Not 100% sure if the implementation is Kosher or not.
NOTE: I also updated the version to 2.1 with this PR. I figured we needed to start documenting the CHANGELOG with a new version number.
Needs squashing too.