Skip to content

Commit

Permalink
983: Upgrade prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
steffenkleinle committed Apr 10, 2024
1 parent 0b60533 commit a22e29b
Show file tree
Hide file tree
Showing 10 changed files with 233 additions and 295 deletions.
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,31 @@
"axios-cache-interceptor": "1.5.1",
"deprecated-react-native-prop-types": "^4.0.0",
"normalize-strings": "^1.1.1",
"react": "18.1.0",
"react-native": "0.70.9",
"react": "18.2.0",
"react-is": "^18.2.0",
"react-native": "0.70.15",
"react-native-audio-recorder-player": "3.5.1",
"react-native-camera": "4.2.1",
"react-native-device-info": "^10.13.1",
"react-native-element-dropdown": "^2.10.4",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "2.9.0",
"react-native-gesture-handler": "^2.15.0",
"react-native-image-crop-picker": "^0.40.3",
"react-native-image-zoom-viewer": "^3.0.1",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-paper": "5.12.3",
"react-native-permissions": "^4.1.5",
"react-native-popover-view": "^5.1.8",
"react-native-progress": "^5.0.1",
"react-native-reanimated": "2.17.0",
"react-native-reanimated": "3.8.1",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^4.9.0",
"react-native-screens": "3.18.2",
"react-native-screens": "^3.30.1",
"react-native-sound-player": "0.13.2",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^15.1.0",
"react-native-svg-transformer": "^1.3.0",
"react-native-tts": "4.1.0",
"react-native-vector-icons": "^10.0.3",
"react-navigation-header-buttons": "^10.0.0",
"string-similarity": "^4.0.4",
"styled-components": "^6.1.8",
Expand All @@ -75,7 +75,6 @@
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.4.4",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/babel__core": "^7",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.30",
"@types/react-native": "^0.70.19",
Expand All @@ -97,11 +96,13 @@
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"jest-transform-stub": "^2.0.0",
"metro-react-native-babel-preset": "0.72.3",
"metro-react-native-babel-preset": "^0.77.0",
"patch-package": "^8.0.0",
"prettier": "^2.7.1",
"prettier": "^3.2.5",
"react-dom": "18.2.0",
"react-test-renderer": "18.2.0",
"ts-jest": "^29.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/routes/repetition/RepetitionScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const RepetitionScreen = ({ navigation }: RepetitionScreenProps): ReactElement =
const { repeatWords, repeatNow, wordsToRepeat, yourLearningProgress } = getLabels().repetition
const { data: numberOfWordsNeedingRepetition, refresh: refreshNumberOfWordsNeedingRepetition } = useLoadAsync(
RepetitionService.getNumberOfWordsNeedingRepetitionWithUpperBound,
undefined
undefined,
)

useFocusEffect(refreshNumberOfWordsNeedingRepetition)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/repetition/__tests__/RepetitionScreen.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('RepetitionScreen', () => {

it('should render screen correctly', async () => {
mocked(RepetitionService.getNumberOfWordsNeedingRepetitionWithUpperBound).mockImplementation(() =>
Promise.resolve(2)
Promise.resolve(2),
)
const { getByText, getByTestId } = render(<RepetitionScreen navigation={navigation} />)
await waitFor(() => expect(getByText(`2 ${getLabels().repetition.wordsToRepeat}`)).toBeDefined())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const RepetitionProgressChart: () => ReactElement = () => {
useFocusEffect(
useCallback(() => {
refresh()
}, [refresh])
}, [refresh]),
)

return (
Expand Down
8 changes: 4 additions & 4 deletions tools/git-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type Options = {
const commitAndTag = async (
versionName: string,
versionCodeString: string,
{ deliverinoPrivateKey, owner, repo, branch }: Options
{ deliverinoPrivateKey, owner, repo, branch }: Options,
) => {
if (branch !== MAIN_BRANCH) {
throw new Error(`Version bumps are only allowed on the ${MAIN_BRANCH} branch!`)
Expand Down Expand Up @@ -90,8 +90,8 @@ const commitAndTag = async (
owner,
repo,
platform,
})
)
}),
),
)
}

Expand All @@ -100,7 +100,7 @@ program
.description('commits the supplied version name and code to github and tags the commit')
.requiredOption(
'--deliverino-private-key <deliverino-private-key>',
'private key of the deliverino github app in pem format with base64 encoding'
'private key of the deliverino github app in pem format with base64 encoding',
)
.requiredOption('--owner <owner>', 'owner of the current repository, usually "digitalfabrik"')
.requiredOption('--repo <repo>', 'the current repository, should be lunes-app')
Expand Down
4 changes: 2 additions & 2 deletions tools/github-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const githubRelease = async (
platform: string,
newVersionName: string,
newVersionCode: string,
{ deliverinoPrivateKey, owner, repo, releaseNotes, downloadLinks, betaRelease, dryRun }: Options
{ deliverinoPrivateKey, owner, repo, releaseNotes, downloadLinks, betaRelease, dryRun }: Options,
) => {
const versionCode = parseInt(newVersionCode, 10)
if (Number.isNaN(versionCode)) {
Expand Down Expand Up @@ -53,7 +53,7 @@ program
.description('creates a new release for the specified platform')
.requiredOption(
'--deliverino-private-key <deliverino-private-key>',
'private key of the deliverino github app in pem format with base64 encoding'
'private key of the deliverino github app in pem format with base64 encoding',
)
.requiredOption('--owner <owner>', 'owner of the current repository, usually "digitalfabrik"')
.requiredOption('--repo <repo>', 'the current repository, should be integreat-app')
Expand Down
4 changes: 2 additions & 2 deletions tools/jira-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ const createRelease = async ({ newVersionName, accessToken, privateKey, consumer
},
}
return jiraApi.updateIssue(issueId, issueUpdate, { notifyUsers: false })
})
}),
)
}

program
.command('create <new-version-name>')
.description(
'create a new release with the name <new-version-name> on jira and assign all issues resolved since the last release'
'create a new release with the name <new-version-name> on jira and assign all issues resolved since the last release',
)
.requiredOption('--project-name <project-name>', 'the name of the jira project, e.g. integreat-app')
.requiredOption('--access-token <access-token>', 'version name of the new release')
Expand Down
10 changes: 5 additions & 5 deletions tools/manage-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const formatDevelopmentNotes = (params: { notes: NoteType[]; platforms: string[]

const parseReleaseNotes = ({ source, ios, android, production }: ParseOptions): string => {
const platforms: string[] = [android ? PLATFORM_ANDROID : undefined, ios ? PLATFORM_IOS : undefined].filter(
(platform): platform is string => !!platform
(platform): platform is string => !!platform,
)

if (platforms.length === 0) {
Expand Down Expand Up @@ -146,19 +146,19 @@ const parseNotesProgram = (options: ParseOptions) => {
program
.command('parse-release-notes')
.description(
'parse the release notes and outputs the release notes as JSON string and writes them to the specified file'
'parse the release notes and outputs the release notes as JSON string and writes them to the specified file',
)
.option('--ios', 'include release notes for ios')
.option('--android', 'include release notes for android')
.option(
'--production',
'whether to hide extra information, e.g. issue keys, hidden notes and platforms and prepare the notes for a store. may not be used with multiple platforms.'
'whether to hide extra information, e.g. issue keys, hidden notes and platforms and prepare the notes for a store. may not be used with multiple platforms.',
)
.option('--destination <destination>', 'if specified the parsed notes are saved to the directory')
.requiredOption(
'--source <source>',
'the directory of the release notes to parse',
`../${RELEASE_NOTES_DIR}/${UNRELEASED_DIR}`
`../${RELEASE_NOTES_DIR}/${UNRELEASED_DIR}`,
)
.action(parseNotesProgram)

Expand Down Expand Up @@ -195,7 +195,7 @@ program
.description('prepare metadata for store')
.option(
'--override-version-name <override-version-name>',
'if specified the release notes will be generated from the specified version name instead of the unreleased notes'
'if specified the release notes will be generated from the specified version name instead of the unreleased notes',
)
.action((storeName: string, options: { overrideVersionName: string }) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion tools/move-release-notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ program
.description("move the release notes in 'unreleased' to a new subdirectory <new-version-name>")
.requiredOption(
'--deliverino-private-key <deliverino-private-key>',
'private key of the deliverino github app in pem format with base64 encoding'
'private key of the deliverino github app in pem format with base64 encoding',
)
.requiredOption('--owner <owner>', 'owner of the current repository, usually "digitalfabrik"')
.requiredOption('--repo <repo>', 'the current repository, usually "lunes-app"')
Expand Down
Loading

0 comments on commit a22e29b

Please sign in to comment.