Skip to content

Commit

Permalink
Bump lint-staged and tslint-react + Re-run lint --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brunolemos committed Nov 8, 2020
1 parent b0e79a9 commit b1c1108
Show file tree
Hide file tree
Showing 18 changed files with 235 additions and 304 deletions.
2 changes: 1 addition & 1 deletion landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"tslint": "6.1.3",
"tslint-config-airbnb": "5.11.2",
"tslint-config-prettier": "1.18.0",
"tslint-react": "4.1.0",
"tslint-react": "5.0.0",
"typescript": "4.0.5"
},
"engines": {
Expand Down
12 changes: 6 additions & 6 deletions landing/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7081,12 +7081,12 @@ tslint-microsoft-contrib@~5.2.1:
dependencies:
tsutils "^2.27.2 <2.29.0"

tslint-react@4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/tslint-react/-/tslint-react-4.1.0.tgz#7153b724a8cfbea52423d0ffa469e8eba3bcc834"
integrity sha512-Y7CbFn09X7Mpg6rc7t/WPbmjx9xPI8p1RsQyiGCLWgDR6sh3+IBSlT+bEkc0PSZcWwClOkqq2wPsID8Vep6szQ==
tslint-react@5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/tslint-react/-/tslint-react-5.0.0.tgz#d0ae644e8163bdd3e134012e9353094904e8dd44"
integrity sha512-/IbcSmoBPlFic8kQaRfQ4knTY4mivwo5LVzvozvX6Dyu2ynEnrh1dIcR2ujjyp/IodXqY/H5GbxFxSMo/Kf2Hg==
dependencies:
tsutils "^3.9.1"
tsutils "^3.17.1"

[email protected]:
version "6.1.3"
Expand Down Expand Up @@ -7121,7 +7121,7 @@ tsutils@^2.29.0:
dependencies:
tslib "^1.8.1"

tsutils@^3.0.0, tsutils@^3.5.0, tsutils@^3.9.1:
tsutils@^3.0.0, tsutils@^3.17.1, tsutils@^3.5.0:
version "3.17.1"
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
"cross-env": "5.2.0",
"husky": "1.3.1",
"jetifier": "1.6.4",
"lint-staged": "8.1.5",
"lint-staged": "10.5.1",
"now": "20.1.2",
"patch-package": "6.0.5",
"postinstall-prepare": "1.0.1",
"prettier": "2.0.5",
"shx": "0.3.2",
"tslint": "6.1.3",
"tslint-config-prettier": "1.18.0",
"tslint-react": "4.1.0",
"tslint-react": "5.0.0",
"typescript": "4.0.5"
},
"resolutions": {
Expand All @@ -66,8 +66,7 @@
"lint-staged": {
"*.{ts,tsx}": [
"tslint --fix",
"prettier --write",
"git add"
"prettier --write"
]
}
}
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"tslint": "6.1.3",
"tslint-config-airbnb": "5.11.2",
"tslint-config-prettier": "1.18.0",
"tslint-react": "4.1.0",
"tslint-react": "5.0.0",
"typescript": "4.0.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import { isItemRead, ThemeColors } from '@devhub/core'
import { ThemeColors } from '@devhub/core'
import { Separator, separatorSize } from '../../common/Separator'
import { useTheme } from '../../context/ThemeContext'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"tslint": "6.1.3",
"tslint-config-airbnb": "5.11.2",
"tslint-config-prettier": "1.18.0",
"tslint-react": "4.1.0",
"tslint-react": "5.0.0",
"typescript": "4.0.5"
}
}
2 changes: 1 addition & 1 deletion packages/core/src/helpers/github/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export async function getIssueOrPullRequestsEnhancementMap(
}

export function enhanceIssueOrPullRequests(
items: Array<GitHubIssueOrPullRequest | EnhancedGitHubIssueOrPullRequest>,
items: (GitHubIssueOrPullRequest | EnhancedGitHubIssueOrPullRequest)[],
enhancementMap: Record<string, IssueOrPullRequestPayloadEnhancement>,
currentEnhancedIssueOrPullRequests: EnhancedGitHubIssueOrPullRequest[] = [],
) {
Expand Down
6 changes: 2 additions & 4 deletions packages/core/src/helpers/github/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ import {
getRepoFullNameFromObject,
} from './url'

export const notificationReasons: Array<
EnhancedGitHubNotification['reason']
> = [
export const notificationReasons: EnhancedGitHubNotification['reason'][] = [
'assign',
'author',
'comment',
Expand Down Expand Up @@ -514,7 +512,7 @@ export async function getNotificationsEnhancementMap(
}

export function enhanceNotifications(
notifications: Array<GitHubNotification | EnhancedGitHubNotification>,
notifications: (GitHubNotification | EnhancedGitHubNotification)[],
enhancementMap: Record<string, NotificationPayloadEnhancement>,
currentEnhancedNotifications: EnhancedGitHubNotification[] = [],
) {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/helpers/github/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ export function createSubscriptionObjectWithId<
}

export function createSubscriptionObjectsWithId<
S extends Array<Pick<ColumnSubscription, 'type' | 'subtype' | 'params'>>
S extends Pick<ColumnSubscription, 'type' | 'subtype' | 'params'>[]
>(subscriptions: S) {
return subscriptions.map((subscription) => ({
...subscription,
Expand Down Expand Up @@ -1273,16 +1273,16 @@ export function getItemOwnersAndRepos(
type: ColumnSubscription['type'],
item: EnhancedItem | undefined,
{ includeFork }: { includeFork?: boolean } = {},
): Array<{ owner: string; repo: string }> {
): { owner: string; repo: string }[] {
const mapResult: Record<string, any> = {}

function mapToResult(map: Record<string, any>) {
return Object.keys(map)
.map((repoFullName) => getOwnerAndRepo(repoFullName))
.filter((or) => !!(or.owner && or.repo)) as Array<{
.filter((or) => !!(or.owner && or.repo)) as {
owner: string
repo: string
}>
}[]
}

function addOwnerAndRepo(
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/helpers/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export function getSearchQueryFromFilter(
}

export function getQueryStringFromQueryTerms(
queryTerms: Array<[string, boolean] | [string, string, boolean]>,
queryTerms: ([string, boolean] | [string, string, boolean])[],
) {
let query = ''
queryTerms.forEach((queryTerm) => {
Expand All @@ -578,10 +578,10 @@ export function getQueryStringFromQueryTerms(

export function getSearchQueryTerms(
query: string | undefined,
): Array<[string, boolean] | [string, string, boolean]> {
): ([string, boolean] | [string, string, boolean])[] {
if (!(query && typeof query === 'string')) return []

const result: Array<[string, boolean] | [string, string, boolean]> = []
const result: ([string, boolean] | [string, string, boolean])[] = []

const q = query.trim()

Expand Down Expand Up @@ -973,7 +973,7 @@ export function getValuesFromQueryKeysFilter(
queryKeys.includes(queryTerm[0] as any),
),
['0', '2'],
) as any) as Array<[string, string, boolean]>
) as any) as [string, string, boolean][]
const usedQueryKeys = _.uniq(
filteredQueryTerms.map((queryTerm) => queryTerm[0]),
)
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/styles/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function loadThemeBase(

export const defaultTheme = loadThemeBase(constants.DEFAULT_THEME_PAIR)

export const staticColorFields: Array<keyof StaticThemeColors> = [
export const staticColorFields: (keyof StaticThemeColors)[] = [
'black',
'blue',
'blueGray',
Expand All @@ -85,7 +85,7 @@ export const staticColorFields: Array<keyof StaticThemeColors> = [
'yellow',
]

export const themeColorFields: Array<keyof ThemeColors> = [
export const themeColorFields: (keyof ThemeColors)[] = [
'primaryBackgroundColor',
'primaryForegroundColor',

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/types/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export interface DatabaseUserFeedback {

export interface DatabaseUser {
_id: any
emails: Array<{
emails: {
provider: 'github' | 'npm'
email: string
primary?: boolean
verified?: boolean
visibility?: 'public' | 'private' | null
}>
}[]
columns?: {
allIds: string[]
byId: Record<string, Column | undefined>
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/types/devhub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export interface ColumnAndSubscriptions {
}

export interface ColumnsAndSubscriptions {
columns: Array<ColumnAndSubscriptions['column']>
columns: ColumnAndSubscriptions['column'][]
subscriptions: ColumnAndSubscriptions['subscriptions']
columnsUpdatedAt?: string
subscriptionsUpdatedAt?: string
Expand Down Expand Up @@ -582,11 +582,11 @@ export interface Plan {
round: 'up' | 'down'
}

featureLabels: Array<{
featureLabels: {
id: FeatureFlagId
label: string
available: boolean
}>
}[]

featureFlags: {
columnsLimit: number
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/types/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ export interface GitHubCommit {
html_url: string
author?: GitHubUser
committer: GitHubUser
parents: Array<{
parents: {
sha: string
url: string
html_url: string
}>
}[]
stats: {
total: number
additions: number
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/types/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export interface StripeSubscription {
ended_at: number | null
items: {
[key: string]: any
data: Array<{
data: {
[key: string]: any
plan: StripePlan
}>
}[]
}
livemode: boolean
metadata: object
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export function getUpdaterMenuItem() {
}

export function getDeveloperMenuItems() {
const menuItems: Array<MenuItemConstructorOptions | undefined> = [
const menuItems: (MenuItemConstructorOptions | undefined)[] = [
{
label: 'Toggle Developer Tools',
accelerator: __DEV__
Expand Down Expand Up @@ -264,7 +264,7 @@ export function getMainMenuItems() {
_mainWindow && _mainWindow.isVisible() && !_mainWindow.isMinimized()
const enabled = isCurrentWindow || !!config.store.get('isMenuBarMode')

const menuItems: Array<MenuItemConstructorOptions | undefined> = [
const menuItems: (MenuItemConstructorOptions | undefined)[] = [
...(process.platform === 'darwin'
? ([
{
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"tslint": "6.1.3",
"tslint-config-airbnb": "5.11.2",
"tslint-config-prettier": "1.18.0",
"tslint-react": "4.1.0",
"tslint-react": "5.0.0",
"typescript": "4.0.5",
"webpack-bundle-analyzer": "3.5.2"
},
Expand Down
Loading

0 comments on commit b1c1108

Please sign in to comment.