floralvikings / jira-connector

NodeJS Wrapper for the Jira REST API
http://floralvikings.github.io/jira-connector/
MIT License
373 stars 180 forks source link

Add basic type definitions for sprint api #206

Closed G-Rath closed 4 years ago

G-Rath commented 4 years ago

Basic type definitions for sprint. Also adjusted the JSDocs, and renamed swapped parameter of #swapSprint to opts for consistency.

G-Rath commented 4 years ago

@MrRefactoring @floralvikings It would be good if we could agree on a standard convention for naming, just b/c I've seen in search you've got ISearchResult & Issue, and I think it's best to try to be consistent.

Personally, I think having things prefixed with Jira is a nice clean way to go. Here's what my types are called:

JiraBoard
BoardLocation
JiraObject
JiraObjectWithKey
JiraIssueType
JiraPriority
JiraStatus
JiraStatusCategory
ApiResults
JiraSearchResults
IssueSearchResults
GetSprintsForBoardResults
AvatarUrlsMap
JiraProjectLead
JiraProjectSimplified
JiraProject
JiraIssueLinkType
JiraInwardIssueLink
JiraOutwardIssueLink
JiraIssueLink
JiraIssue
JiraIssueFields
JiraUser
JiraProgress
JiraIssueFieldsWithAssignee
JiraIssueWithAssignee
TicketIssuePair
JiraMyself
JiraTransition
JiraIssueTransitionsList

All the exported ones are prefixed w/ Jira, and theres a few of my own in there too. Let me know what you think - it doesn't have to be a hard rule, but just having something roughly agreed to means I don't have to feel bad if I rename something in the process of expanding the type definitions :joy:

MrRefactoring commented 4 years ago

I am quite loyal in this regard. I love one style. Given that this is a project in which everyone managed to invest in their own style, if you are ready to lead to a unified style, Iā€™m glad to see

G-Rath commented 4 years ago

@MrRefactoring that's great to hear - I'm exactly the same: consistently & unified styling makes work so much faster & cleaner, so I'm more than happy to lead that front.

I can start by applying my typical prettier & eslint configurations if you'd like šŸ™‚

MrRefactoring commented 4 years ago

Maybe I'm wrong, but somehow I tried to add eslint and it was rejected. You need to look at the latest PRs for the presence of eslint and the reasons for the failure. šŸ„“šŸ˜Š

But maybe I'm wrong and did not try to add anything šŸ˜‚

G-Rath commented 4 years ago

@MrRefactoring I've added eslint & co via #208