Skip to content

Commit

Permalink
Remove the eslint no-use-before-define rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Kshitij-Katiyar committed May 24, 2024
1 parent 1e72715 commit eaeec98
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 42 deletions.
9 changes: 1 addition & 8 deletions webapp/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,7 @@
"args": "after-used"
}
],
"no-use-before-define": [
2,
{
"classes": false,
"functions": false,
"variables": false
}
],
"no-use-before-define": 0,
"no-useless-computed-key": 2,
"no-useless-concat": 2,
"no-useless-constructor": 2,
Expand Down
58 changes: 29 additions & 29 deletions webapp/src/types/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,6 @@ export type AllowedValue = {
name?: string;
};

export enum JiraFieldCustomTypeEnums {
SPRINT = 'com.pyxis.greenhopper.jira:gh-sprint',
EPIC_LINK = 'com.pyxis.greenhopper.jira:gh-epic-link',
EPIC_NAME = 'com.pyxis.greenhopper.jira:gh-epic-label',
RANK = 'com.pyxis.greenhopper.jira:gh-lexo-rank',

CASCADING_SELECT = 'com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect',
TEXT_AREA = 'com.atlassian.jira.plugin.system.customfieldtypes:textarea',
TEXT_FIELD = 'com.atlassian.jira.plugin.system.customfieldtypes:textfield',
SELECT = 'com.atlassian.jira.plugin.system.customfieldtypes:select',
PROJECT = 'com.atlassian.jira.plugin.system.customfieldtypes:project',

MULTI_SELECT = 'com.atlassian.jira.plugin.system.customfieldtypes:multiselect',
RADIO_BUTTONS = 'com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons',
MULTI_CHECKBOXES = 'com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes',
URL_FIELD = 'com.atlassian.jira.plugin.system.customfieldtypes:url',

LABELS = 'com.atlassian.jira.plugin.system.customfieldtypes:labels',
USER_PICKER = 'com.atlassian.jira.plugin.system.customfieldtypes:userpicker',
}

export type FieldSchema = {
type: string;
system?: string;
Expand Down Expand Up @@ -86,11 +65,6 @@ export type Project = {
issuetypes: IssueType[];
}

export type Status = {
id: string;
name: string;
}

export type IssueTypeWithStatuses = {
id: string;
name: string;
Expand All @@ -102,9 +76,9 @@ export type IssueMetadata = {
issue_types_with_statuses: IssueTypeWithStatuses[];
}

export type SavedFieldValues = {
project_key?: string;
issue_type?: string;
export type Status = {
id: string;
name: string;
}

export type ProjectMetadata = {
Expand All @@ -113,6 +87,11 @@ export type ProjectMetadata = {
saved_field_values?: SavedFieldValues;
}

export type SavedFieldValues = {
project_key?: string;
issue_type?: string;
}

export enum JiraFieldTypeEnums {
PROJECT = 'project',
ISSUE_TYPE = 'issuetype',
Expand Down Expand Up @@ -143,6 +122,27 @@ export type JiraUser = {
timeZone: string;
}

export enum JiraFieldCustomTypeEnums {
SPRINT = 'com.pyxis.greenhopper.jira:gh-sprint',
EPIC_LINK = 'com.pyxis.greenhopper.jira:gh-epic-link',
EPIC_NAME = 'com.pyxis.greenhopper.jira:gh-epic-label',
RANK = 'com.pyxis.greenhopper.jira:gh-lexo-rank',

CASCADING_SELECT = 'com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect',
TEXT_AREA = 'com.atlassian.jira.plugin.system.customfieldtypes:textarea',
TEXT_FIELD = 'com.atlassian.jira.plugin.system.customfieldtypes:textfield',
SELECT = 'com.atlassian.jira.plugin.system.customfieldtypes:select',
PROJECT = 'com.atlassian.jira.plugin.system.customfieldtypes:project',

MULTI_SELECT = 'com.atlassian.jira.plugin.system.customfieldtypes:multiselect',
RADIO_BUTTONS = 'com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons',
MULTI_CHECKBOXES = 'com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes',
URL_FIELD = 'com.atlassian.jira.plugin.system.customfieldtypes:url',

LABELS = 'com.atlassian.jira.plugin.system.customfieldtypes:labels',
USER_PICKER = 'com.atlassian.jira.plugin.system.customfieldtypes:userpicker',
}

export enum FilterFieldInclusion {
INCLUDE_ANY = 'include_any',
INCLUDE_ALL = 'include_all',
Expand Down
10 changes: 5 additions & 5 deletions webapp/src/types/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export type TicketDetails = {
issueIcon: string;
}

export type TicketData = {
key: string;
fields: TicketDataFields;
}

export type AvatarUrls = {
'48x48': string;
}
Expand All @@ -28,11 +33,6 @@ export type TicketDataFields = {
issuetype: {iconUrl: string};
}

export type TicketData = {
key: string;
fields: TicketDataFields;
}

export type IssueAction = {
type: string;
data: TicketData;
Expand Down

0 comments on commit eaeec98

Please sign in to comment.