Skip to content

Commit df0bcf2

Browse files
committed
Bump prettier and eslint (+ reformat whole project)
1 parent 2435eb2 commit df0bcf2

File tree

81 files changed

+947
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+947
-511
lines changed

Diff for: .eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
'plugin:@typescript-eslint/recommended-requiring-type-checking',
99
'plugin:react/recommended',
1010
'plugin:prettier/recommended',
11-
'prettier/@typescript-eslint',
11+
'prettier',
1212
],
1313
parser: '@typescript-eslint/parser',
1414
parserOptions: {

Diff for: landing/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
"@types/react-stripe-elements": "1.3.5",
4242
"@types/stripe-v3": "3.1.9",
4343
"@types/styled-jsx": "2.2.8",
44-
"@typescript-eslint/eslint-plugin": "4.9.1",
45-
"@typescript-eslint/parser": "4.9.1",
46-
"eslint": "7.15.0",
47-
"eslint-config-nextjs": "1.0.6",
48-
"eslint-config-prettier": "7.0.0",
49-
"eslint-plugin-prettier": "3.2.0",
44+
"@typescript-eslint/eslint-plugin": "4.28.0",
45+
"@typescript-eslint/parser": "4.28.0",
46+
"eslint": "7.29.0",
47+
"eslint-config-nextjs": "1.0.7",
48+
"eslint-config-prettier": "8.3.0",
49+
"eslint-plugin-prettier": "3.4.0",
5050
"mkdirp": "1.0.4",
5151
"node-fetch": "2.6.1",
5252
"now": "21.0.1",
53-
"prettier": "2.2.1",
53+
"prettier": "2.3.1",
5454
"shx": "0.3.3",
5555
"ts-node": "9.1.1",
5656
"typescript": "4.3.4"

Diff for: package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,20 @@
3939
},
4040
"devDependencies": {
4141
"@primer/octicons-v2": "canary",
42-
"@typescript-eslint/eslint-plugin": "4.9.0",
43-
"@typescript-eslint/parser": "4.9.0",
42+
"@typescript-eslint/eslint-plugin": "4.28.0",
43+
"@typescript-eslint/parser": "4.28.0",
4444
"concurrently": "5.3.0",
4545
"cross-env": "7.0.3",
46-
"eslint": "7.15.0",
47-
"eslint-config-prettier": "7.0.0",
48-
"eslint-plugin-prettier": "3.2.0",
46+
"eslint": "7.29.0",
47+
"eslint-config-prettier": "8.3.0",
48+
"eslint-plugin-prettier": "3.4.0",
49+
"eslint-plugin-react": "7.24.0",
4950
"husky": "4.3.4",
5051
"lint-staged": "10.5.3",
5152
"now": "21.0.1",
5253
"patch-package": "6.2.2",
5354
"postinstall-prepare": "1.0.1",
54-
"prettier": "2.2.1",
55+
"prettier": "2.3.1",
5556
"shx": "0.3.3",
5657
"typescript": "4.3.4"
5758
},

Diff for: packages/components/src/components/AppGlobalStyles.web.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ export const AppGlobalStyles = React.memo(() => {
3535

3636
const styles = getStyles({ theme })
3737

38-
return useMemo(() => <style key="app-global-styles-inner">{styles}</style>, [
39-
styles,
40-
])
38+
return useMemo(
39+
() => <style key="app-global-styles-inner">{styles}</style>,
40+
[styles],
41+
)
4142
})
4243

4344
AppGlobalStyles.displayName = 'AppGlobalStyles'

Diff for: packages/components/src/components/animated/helpers.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import { Animated } from 'react-native'
33

44
export function createAnimatedComponent<
5-
T extends React.ComponentClass<any, any>
5+
T extends React.ComponentClass<any, any>,
66
>(component: T) {
77
return Animated.createAnimatedComponent(component)
88
}

Diff for: packages/components/src/components/animated/spring/SpringAnimatedActivityIndicator.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { createSpringAnimatedComponent } from './helpers'
44

55
export type SpringAnimatedActivityIndicatorProps = ActivityIndicatorProps
66

7-
export const SpringAnimatedActivityIndicator = createSpringAnimatedComponent(
8-
ActivityIndicator,
9-
)
7+
export const SpringAnimatedActivityIndicator =
8+
createSpringAnimatedComponent(ActivityIndicator)
109
SpringAnimatedActivityIndicator.displayName = 'SpringAnimatedActivityIndicator'

Diff for: packages/components/src/components/animated/spring/SpringAnimatedImageWithLoading.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { createSpringAnimatedComponent } from './helpers'
66

77
export type SpringAnimatedImageWithLoadingProps = ImageWithLoadingProps
88

9-
export const SpringAnimatedImageWithLoading = createSpringAnimatedComponent(
10-
ImageWithLoading,
11-
)
9+
export const SpringAnimatedImageWithLoading =
10+
createSpringAnimatedComponent(ImageWithLoading)
1211
SpringAnimatedImageWithLoading.displayName = 'SpringAnimatedImageWithLoading'

Diff for: packages/components/src/components/animated/spring/SpringAnimatedSafeAreaView.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import { createSpringAnimatedComponent } from './helpers'
55

66
export type SpringAnimatedSafeAreaViewProps = ViewProps
77

8-
export const SpringAnimatedSafeAreaView = createSpringAnimatedComponent(
9-
SafeAreaView,
10-
)
8+
export const SpringAnimatedSafeAreaView =
9+
createSpringAnimatedComponent(SafeAreaView)
1110
SpringAnimatedSafeAreaView.displayName = 'SpringAnimatedSafeAreaView'
1211

1312
export type SpringAnimatedSafeAreaView = SafeAreaView

Diff for: packages/components/src/components/animated/spring/SpringAnimatedTouchableOpacity.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { createSpringAnimatedComponent } from './helpers'
66

77
export type SpringAnimatedTouchableOpacityProps = TouchableOpacityProps
88

9-
export const SpringAnimatedTouchableOpacity = createSpringAnimatedComponent(
10-
TouchableOpacity,
11-
)
9+
export const SpringAnimatedTouchableOpacity =
10+
createSpringAnimatedComponent(TouchableOpacity)
1211
SpringAnimatedTouchableOpacity.displayName = 'SpringAnimatedTouchableOpacity'

Diff for: packages/components/src/components/animated/spring/helpers.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export function createSpringAnimatedComponent<T extends ElementType<any>>(
55
component: T,
66
) {
77
// TODO: Fix type definition
8-
return (animated(component) as unknown) as any // eslint-disable-line
8+
return animated(component) as unknown as any // eslint-disable-line
99
}

Diff for: packages/components/src/components/cards/BaseCard.shared.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -948,9 +948,8 @@ function _getCardPropsForItem(
948948
})()
949949

950950
const repoURL = repo.html_url || getRepoUrlFromOtherUrl(repo.url)
951-
const { owner: repoOwnerName, repo: repoName } = getOwnerAndRepo(
952-
repoFullName,
953-
)
951+
const { owner: repoOwnerName, repo: repoName } =
952+
getOwnerAndRepo(repoFullName)
954953

955954
const reasonMetadata = getNotificationReasonMetadata(notification.reason)
956955

@@ -1159,18 +1158,19 @@ function _getCardPropsForItem(
11591158
}
11601159

11611160
const _memoizedGetCardPropsForItemFnByColumnId = betterMemoize(
1162-
(_columnId: string) => (
1163-
type: ColumnSubscription['type'],
1164-
item: EnhancedItem,
1165-
ownerIsKnown: boolean,
1166-
plan: UserPlan | null | undefined,
1167-
repoIsKnown: boolean,
1168-
) =>
1169-
_getCardPropsForItem(type, item, {
1170-
ownerIsKnown,
1171-
plan,
1172-
repoIsKnown,
1173-
}),
1161+
(_columnId: string) =>
1162+
(
1163+
type: ColumnSubscription['type'],
1164+
item: EnhancedItem,
1165+
ownerIsKnown: boolean,
1166+
plan: UserPlan | null | undefined,
1167+
repoIsKnown: boolean,
1168+
) =>
1169+
_getCardPropsForItem(type, item, {
1170+
ownerIsKnown,
1171+
plan,
1172+
repoIsKnown,
1173+
}),
11741174
undefined,
11751175
10,
11761176
)

Diff for: packages/components/src/components/cards/CardsFooter.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ export interface CardsFooterProps {
2727
}
2828

2929
export const CardsFooter = React.memo((props: CardsFooterProps) => {
30-
const {
31-
clearedAt,
32-
columnId,
33-
fetchNextPage,
34-
isEmpty,
35-
refresh,
36-
topSpacing,
37-
} = props
30+
const { clearedAt, columnId, fetchNextPage, isEmpty, refresh, topSpacing } =
31+
props
3832

3933
const dispatch = useDispatch()
4034
const { sizename } = useAppLayout()

Diff for: packages/components/src/components/cards/CardsOwnerFilterBar.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export interface CardsOwnerFilterBarProps {
3131
const ownersCacheByColumnId = new Map<string, Set<string>>()
3232
const lastUsernameCacheByColumnId = new Map<string, string | undefined>()
3333

34-
export const cardsOwnerFilterBarTotalHeight = cardsGenericOwnerFilterBarTotalHeight
34+
export const cardsOwnerFilterBarTotalHeight =
35+
cardsGenericOwnerFilterBarTotalHeight
3536

3637
export const CardsOwnerFilterBar = React.memo(
3738
(props: CardsOwnerFilterBarProps) => {

Diff for: packages/components/src/components/cards/CardsSearchHeader.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ const ScrollViewComponent = Platform.select<
5555
() => ScrollViewWithOverlayProps['ScrollViewComponent']
5656
>({
5757
android: () => {
58-
const GestureHandlerScrollView = require('react-native-gesture-handler')
59-
.ScrollView
58+
const GestureHandlerScrollView =
59+
require('react-native-gesture-handler').ScrollView
6060
return (p: ScrollViewProps) => (
6161
<GestureHandlerScrollView {...p} nestedScrollEnabled />
6262
)

Diff for: packages/components/src/components/cards/CardsWatchingOwnerFilterBar.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export interface CardsWatchingOwnerFilterBarProps {
2828
key: string
2929
}
3030

31-
export const cardsWatchingOwnerFilterBarTotalHeight = cardsGenericOwnerFilterBarTotalHeight
31+
export const cardsWatchingOwnerFilterBarTotalHeight =
32+
cardsGenericOwnerFilterBarTotalHeight
3233

3334
export const CardsWatchingOwnerFilterBar = React.memo(
3435
(props: CardsWatchingOwnerFilterBarProps) => {

Diff for: packages/components/src/components/cards/GenericMessageWithButtonView.tsx

+2-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,8 @@ export interface GenericMessageWithButtonViewProps {
2727

2828
export const GenericMessageWithButtonView = React.memo(
2929
(props: GenericMessageWithButtonViewProps) => {
30-
const {
31-
buttonView,
32-
emoji,
33-
footer,
34-
fullCenter,
35-
style,
36-
subtitle,
37-
title,
38-
} = props
30+
const { buttonView, emoji, footer, fullCenter, style, subtitle, title } =
31+
props
3932

4033
const emojiImageURL = emoji ? getEmojiImageURL(emoji) : null
4134

Diff for: packages/components/src/components/cards/SwipeableCard.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,10 @@ export function SwipeableCard(props: CardWithLinkProps) {
4040
)
4141
}
4242

43-
const Content = useMemo(() => <CardWithLink {...props} isInsideSwipeable />, [
44-
columnId,
45-
item,
46-
ownerIsKnown,
47-
repoIsKnown,
48-
type,
49-
])
43+
const Content = useMemo(
44+
() => <CardWithLink {...props} isInsideSwipeable />,
45+
[columnId, item, ownerIsKnown, repoIsKnown, type],
46+
)
5047

5148
return (
5249
<SwipeableRow

Diff for: packages/components/src/components/cards/partials/GenericOwnerFilterBar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ const renderScrollComponent = Platform.select<
6161
() => FlatListProps<any>['renderScrollComponent']
6262
>({
6363
android: () => {
64-
const GestureHandlerScrollView = require('react-native-gesture-handler')
65-
.ScrollView
64+
const GestureHandlerScrollView =
65+
require('react-native-gesture-handler').ScrollView
6666
return (p: any) => <GestureHandlerScrollView {...p} nestedScrollEnabled />
6767
},
6868
default: () => undefined,

Diff for: packages/components/src/components/columns/ColumnFilters.tsx

+10-12
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ export const ColumnFilters = React.memo((props: ColumnFiltersProps) => {
133133
ownerFilters,
134134
ownerFiltersWithRepos,
135135
repoFilters,
136-
} = useMemo(() => getOwnerAndRepoFormattedFilter(column && column.filters), [
137-
column && column.filters,
138-
])
136+
} = useMemo(
137+
() => getOwnerAndRepoFormattedFilter(column && column.filters),
138+
[column && column.filters],
139+
)
139140

140141
const ownerOrRepoFilteredItemsMetadata = useMemo(
141142
() =>
@@ -1401,12 +1402,10 @@ export const ColumnFilters = React.memo((props: ColumnFiltersProps) => {
14011402
const isRepoFilterStrict =
14021403
filterRecordWithThisValueCount(repoFilters, true) >= 1
14031404

1404-
const ownerFilterHasForcedValue = filterRecordHasAnyForcedValue(
1405-
ownerFilters,
1406-
)
1407-
const repoFilterHasForcedValue = filterRecordHasAnyForcedValue(
1408-
repoFilters,
1409-
)
1405+
const ownerFilterHasForcedValue =
1406+
filterRecordHasAnyForcedValue(ownerFilters)
1407+
const repoFilterHasForcedValue =
1408+
filterRecordHasAnyForcedValue(repoFilters)
14101409

14111410
const owners = _.sortBy(
14121411
Object.keys(
@@ -1473,9 +1472,8 @@ export const ColumnFilters = React.memo((props: ColumnFiltersProps) => {
14731472
defaultBooleanValue,
14741473
) >= 1
14751474

1476-
const thisOwnerRepoFilterHasForcedValue = filterRecordHasAnyForcedValue(
1477-
thisOwnerRepoFilters,
1478-
)
1475+
const thisOwnerRepoFilterHasForcedValue =
1476+
filterRecordHasAnyForcedValue(thisOwnerRepoFilters)
14791477

14801478
return (
14811479
<Fragment key={`owner-option-fragment-${owner}`}>

Diff for: packages/components/src/components/columns/ColumnHeader.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,8 @@ export function ColumnHeader(props: ColumnHeaderProps) {
9393
const bannerMessage = useReduxState(selectors.bannerMessageSelector)
9494
const plan = useReduxState(selectors.currentUserPlanSelector)
9595
const { column } = useColumn(columnId || '')
96-
const {
97-
enablePushNotifications: enableDesktopPushNotifications,
98-
} = useDesktopOptions()
96+
const { enablePushNotifications: enableDesktopPushNotifications } =
97+
useDesktopOptions()
9998

10099
const enableDesktopPushNotificationsOption = getColumnOption(
101100
column,

Diff for: packages/components/src/components/columns/ColumnRenderer.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ import { ColumnFiltersRenderer } from './ColumnFiltersRenderer'
4545
import { ColumnHeader } from './ColumnHeader'
4646
import { ColumnOptionsAccordion } from './ColumnOptionsAccordion'
4747

48-
export function getColumnCardThemeColors({
49-
isDark,
50-
}: {
51-
isDark: boolean
52-
}): {
48+
export function getColumnCardThemeColors({ isDark }: { isDark: boolean }): {
5349
column: keyof ThemeColors
5450
card: keyof ThemeColors
5551
card__hover: keyof ThemeColors

Diff for: packages/components/src/components/columns/ModalColumn.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ export const ModalColumn = React.memo((props: ModalColumnProps) => {
133133
>
134134
<View style={sharedStyles.flex}>{children}</View>
135135

136-
{!([
137-
'ADD_COLUMN',
138-
'ADD_COLUMN_DETAILS',
139-
] as ModalPayload['name'][]).includes(name) && (
136+
{!(
137+
['ADD_COLUMN', 'ADD_COLUMN_DETAILS'] as ModalPayload['name'][]
138+
).includes(name) && (
140139
<View
141140
style={[
142141
sharedStyles.fullWidth,

Diff for: packages/components/src/components/common/IconButton.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ export function IconButton(props: IconButtonProps) {
178178
)
179179
}
180180

181-
export function getIconButtonColors(
182-
type?: IconButtonProps['type'],
183-
): {
181+
export function getIconButtonColors(type?: IconButtonProps['type']): {
184182
foregroundThemeColor: keyof ThemeColors
185183
tintBackgroundHoveredOpacity: number
186184
tintBackgroundPressedOpacity: number

Diff for: packages/components/src/components/common/IntervalRefresh.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ export function IntervalRefresh(props: IntervalRefreshProps) {
5151
useEffect(() => {
5252
clearInterval(timerRef.current)
5353

54-
timerRef.current = (setInterval(() => {
54+
timerRef.current = setInterval(() => {
5555
setUpdatedTimes((prevValue) => prevValue + 1)
56-
}, interval) as any) as number
56+
}, interval) as any as number
5757

5858
return () => clearInterval(timerRef.current)
5959
}, [interval])

0 commit comments

Comments
 (0)