Skip to content

Commit

Permalink
Merge pull request #26711 from qmonmert/prettier333
Browse files Browse the repository at this point in the history
Upgrade Prettier 3.3.3
  • Loading branch information
DanielFran authored Jul 13, 2024
2 parents 48b49c9 + 1e7a4c1 commit 9041014
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion generators/base-application/support/prepare-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default function prepareEntity(entityWithConfig, generator, application)
__override__: false,
i18nKeyPrefix: data => data.i18nKeyPrefix ?? `${data.frontendAppName}.${data.entityTranslationKey}`,
i18nAlertHeaderPrefix: data =>
data.i18nAlertHeaderPrefix ?? data.microserviceAppName
(data.i18nAlertHeaderPrefix ?? data.microserviceAppName)
? `${data.microserviceAppName}.${data.entityTranslationKey}`
: data.i18nKeyPrefix,
hasRelationshipWithBuiltInUser: ({ relationships }) => relationships.some(relationship => relationship.otherEntity.builtInUser),
Expand Down
2 changes: 1 addition & 1 deletion generators/client/support/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function clientBlock({
}): WriteFileBlock | Pick<WriteFileBlock, 'path' | 'renameTo'> {
const block: RelativeWriteFileBlock | undefined = typeof blockOrRelativePath !== 'string' ? blockOrRelativePath : undefined;
const blockRenameTo = typeof block?.renameTo === 'function' ? block.renameTo : undefined;
const relativePath: string = typeof blockOrRelativePath === 'string' ? blockOrRelativePath : blockOrRelativePath.relativePath ?? '';
const relativePath: string = typeof blockOrRelativePath === 'string' ? blockOrRelativePath : (blockOrRelativePath.relativePath ?? '');
return {
path: `${srcPath}${relativeToSrc}${relativePath}`,
...block,
Expand Down
4 changes: 2 additions & 2 deletions generators/cypress/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export default class CypressGenerator extends BaseApplicationGenerator {
get preparing() {
return this.asPreparingTaskGroup({
prepareForTemplates({ application }) {
application.cypressDir = application.cypressDir ?? application.clientTestDir ? `${application.clientTestDir}cypress/` : 'cypress';
application.cypressDir = (application.cypressDir ?? application.clientTestDir) ? `${application.clientTestDir}cypress/` : 'cypress';
application.cypressTemporaryDir =
application.cypressTemporaryDir ?? application.temporaryDir ? `${application.temporaryDir}cypress/` : '.cypress/';
(application.cypressTemporaryDir ?? application.temporaryDir) ? `${application.temporaryDir}cypress/` : '.cypress/';
application.cypressBootstrapEntities = application.cypressBootstrapEntities ?? true;
},
});
Expand Down
2 changes: 1 addition & 1 deletion generators/java/support/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function javaBlock({
}): WriteFileBlock | Pick<WriteFileBlock, 'path' | 'renameTo'> {
const block: RelativeWriteFileBlock | undefined = typeof blockOrRelativePath !== 'string' ? blockOrRelativePath : undefined;
const blockRenameTo = typeof block?.renameTo === 'function' ? block.renameTo : undefined;
const relativePath: string = typeof blockOrRelativePath === 'string' ? blockOrRelativePath : blockOrRelativePath.relativePath ?? '';
const relativePath: string = typeof blockOrRelativePath === 'string' ? blockOrRelativePath : (blockOrRelativePath.relativePath ?? '');
return {
path: `${srcPath}${relativePath}`,
...block,
Expand Down
2 changes: 1 addition & 1 deletion generators/jdl/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class JdlGenerator extends BaseGenerator {
const interactiveFallback = !allNew;

this.interactive = this.interactive ?? interactiveFallback;
this.force = this.options.force ?? (nrApplications > 0 && allNew) ? true : undefined;
this.force = (this.options.force ?? (nrApplications > 0 && allNew)) ? true : undefined;
this.reproducible = allNew;
},
customizeApplication() {
Expand Down
2 changes: 1 addition & 1 deletion generators/spring-data-relational/support/database-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const h2GetProdDatabaseData = (
data.port = ':12344';
}

const h2ProdDatabaseMode = prodDatabaseType ? H2_PROD_DATABASE_MODE[prodDatabaseType] ?? '' : '';
const h2ProdDatabaseMode = prodDatabaseType ? (H2_PROD_DATABASE_MODE[prodDatabaseType] ?? '') : '';
return {
...data,
localDirectory,
Expand Down
2 changes: 1 addition & 1 deletion generators/upgrade/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default class UpgradeGenerator extends BaseGenerator {
*/
async cleanUp() {
const gitignoreContent = this.readDestination('.gitignore', { defaults: '' });
const ignoredFiles = gitignoreContent ? gitignore(gitignoreContent).patterns ?? [] : [];
const ignoredFiles = gitignoreContent ? (gitignore(gitignoreContent).patterns ?? []) : [];
const filesToKeep = ['.yo-rc.json', '.jhipster', 'package.json', 'package-lock.json', 'node_modules', '.git', ...ignoredFiles];
for (const file of await readdir(this.destinationPath())) {
if (!filesToKeep.includes(file)) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"parse-gitignore": "2.0.0",
"piscina": "4.6.1",
"pluralize": "8.0.0",
"prettier": "3.3.2",
"prettier": "3.3.3",
"prettier-plugin-java": "2.6.4",
"prettier-plugin-packagejson": "2.5.0",
"prettier-plugin-properties": "0.3.0",
Expand Down

0 comments on commit 9041014

Please sign in to comment.