Add typescript usage test, fix typescript errors #111
Add typescript usage test, fix typescript errors #111matheus1lva merged 4 commits intoshellscape:masterfrom
Conversation
|
The tests for this are a welcomed addition and wonderful compliment to the project. I thank you! |
|
Added prettierrc and re-saved the files. I think it's good to go. |
|
This fixes a build-breaking change. I'm not trying to be pushy but our build is broken. Is there any chance to get this published today? If not I'll revert locally so our build can proceed. |
|
I just had a child born Monday morning and I'm short on time, so extra some patience will be needed. We like to get 2 or more approvals before merging. I'll be able to review the latest commit later this evening. |
bebraw
left a comment
There was a problem hiding this comment.
Run with it. I would do 0.7.0 since it's a bigger change, though. 👍
| semi: true | ||
| singleQuote: true | ||
| trailingComma: all | ||
| bracketSpacing: true |
There was a problem hiding this comment.
Why to override so many defaults?
There was a problem hiding this comment.
Ah, I see. It's about matching previous style more or less.
|
Finally got the chance to examine this. TSLint errors aren't being reported outside of the editor, meaning that any errors in the file aren't being caught by the npm script, and as such would always pass in the verification build step. Also removed the I'm working on cleaning that up now, but the build steo has to be fixed before we release. |
|
@shellscape eslint is not prettier (and vice versa). I have prettier integrated as a vscode plugin, and on every single OSS project I maintain/contribute to. When I save a file, the vscode plugin will obey the prettier config in the project. When the config is not there, it will use the default prettier config, which will get you exactly the file that you nitpicked. If you don't include a prettier config, it will continue to give similar problems to others. It is certainly your prerogative, but it mystifies me when e.g. one prefers fixing a trailing comma manually or with eslint fix vs automatically fixing it with prettier. I can say there is my life before prettier, and after prettier, and it is just not even a thought anymore as I start or contribute to other projects. This will help with the eslint/prettier integration https://github.com/prettier/eslint-config-prettier if you are interested. |
|
The language is a bit strong, but I'll indulge. We simply have different preferences. I had a rather long response written but it basically boils down to that one fact. While we're happy to include a type definition file, this is not a TypeScript project. And the tools in the repo are setup for the sort of project it actually is. To that end, DefinitelyTyped might be a better home for it. I would never block a PR for a dangling comma, but switching all quotes from one form to another is a relatively large change that typically stands out. I'd wager that anyone looking at the diff would see as much as well. I don't agree that not including a prettier config will cause the same kinds of issues in the future because you were kind enough to setup TSLint, which is dynamic enough to catch most of the formatting issues that would raise a flag moving forward. If you're interested in our prettier ruleset that we use in conjunction with ESLint, you can find them here: https://github.com/shellscape/eslint-config-shellscape/blob/b0bbe3bc077664a13141e8010e27ca31a2d6c9e0/.eslintrc.json#L11-L14 I thank you again for contributing a major improvement to the project. |
|
My thought was to get a prettier config consistent with current styling, not proposing a style change...just proposing tooling that makes it easier for collaborators to fit-in. |
|
Given that TSLint alerts on error (in editor for those with editor plugins, when running |
Closes #110
This PR contains:
Breaking Changes?
If yes, please describe the breakage.
Please Describe Your Changes
declare module- this is not needed in-repo - only for out of repo declarations/augmentationstestscript to prevent future errorsNone of the above changes change any current tests or runtime code.
If it isn't too much trouble, please release this ASAP since the current
masterbreaks any TS build currently.