Skip to content

Commit

Permalink
style: 💄 run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Sep 17, 2024
1 parent ffc8279 commit 85cb958
Show file tree
Hide file tree
Showing 181 changed files with 2,185 additions and 1,496 deletions.
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug Report
description: Report a bug in one of the Transloco packages
title: "Bug(scope):"
title: 'Bug(scope):'

body:
- type: checkboxes
Expand All @@ -9,8 +9,8 @@ body:
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
required: true

- type: dropdown
id: affected-packages
attributes:
Expand Down Expand Up @@ -47,7 +47,7 @@ body:
label: Current behavior
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
Expand All @@ -59,10 +59,10 @@ body:
id: reproduction
attributes:
label: Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.
description: "You can fork this CodeSandbox playground: https://codesandbox.io/s/ngneat-transloco-kn52hs"
description: 'You can fork this CodeSandbox playground: https://codesandbox.io/s/ngneat-transloco-kn52hs'
validations:
required: true

- type: textarea
id: transloco-config
attributes:
Expand All @@ -80,7 +80,7 @@ body:
Angular:
Node:
Package Manager:
OS:
OS:
- type: textarea
id: browser
Expand All @@ -93,13 +93,13 @@ body:
Safari (desktop/iOS) version XX
IE version XX
Edge version XX
- type: textarea
id: other
attributes:
label: Additional context
description: Links? References? Anything that will give us more context about the issue you are encountering!

- type: dropdown
id: contribution
attributes:
Expand All @@ -108,4 +108,4 @@ body:
- 'Yes 🚀'
- 'No'
validations:
required: true
required: true
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Suggest an idea for this project
title: "Feature(scope):"
title: 'Feature(scope):'

body:
- type: checkboxes
Expand Down Expand Up @@ -37,7 +37,7 @@ body:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is.
placeholder: Ex. I'm always frustrated when [...]

- type: textarea
id: solution
attributes:
Expand Down Expand Up @@ -67,4 +67,4 @@ body:
- 'Yes 🚀'
- 'No'
validations:
required: true
required: true
8 changes: 2 additions & 6 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"*.{ts,js}": [
"eslint --fix",
],
"*.{js,json,css,scss,less,md,ts,html,component.html}": [
"prettier --write"
]
"*.{ts,js}": ["eslint --fix"],
"*.{js,json,css,scss,less,md,ts,html,component.html}": ["prettier --write"]
}
11 changes: 7 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Add files here to ignore them from prettier formatting

node_modules
/dist
/coverage
/docs/docs
/.nx
/tmp
/.angular

/.nx/cache

/.nx/workspace-data
/docs/build
/docs/.docusaurus
/docs/static/transloco-playground
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Packages were moved to the jsverse scope, the versioning continues from the last

- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7).
- Updated the transpile method usages.
- Minimum Transloco version is now `^7.0.0`.
- Minimum Transloco version is now `^7.0.0`.

## Transloco Locale

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export function testDynamicContent() {
cy.get(`[data-cy=add-translation-btn]`).click();
cy.get(`[data-cy=translation-object]`).should(
'contain',
'New translation title'
'New translation title',
);
}
6 changes: 3 additions & 3 deletions apps/transloco-playground-e2e/src/integration/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function testHomeContent(lang = 'english') {
cy.get(`[data-cy=with-params]`).should('contain', `alert 🦄 ${lang}`);
cy.get(`[data-cy=with-translation-reuse]`).should(
'contain',
`a.b.c from list ${lang}`
`a.b.c from list ${lang}`,
);
cy.get(`[data-cy=static-lang-en]`).should('contain', `home english`);
cy.get(`[data-cy=current-lang]`).should('contain', `en`);
Expand All @@ -14,7 +14,7 @@ export function testHomeContent(lang = 'english') {
cy.get(`[data-cy=d-with-params]`).should('contain', `alert 🦄 ${lang}`);
cy.get(`[data-cy=d-with-translation-reuse]`).should(
'contain',
`a.b.c from list ${lang}`
`a.b.c from list ${lang}`,
);
cy.get(`[data-cy=d-dynamic-key]`).should('contain', `home ${lang}`);
cy.get(`[data-cy=d-static-lang-es]`).should('contain', `home spanish`);
Expand All @@ -36,7 +36,7 @@ export function testHomeContent(lang = 'english') {
cy.get(`[data-cy=p-with-params]`).should('contain', `alert 🦄 ${lang}`);
cy.get(`[data-cy=p-with-translation-reuse]`).should(
'contain',
`a.b.c from list ${lang}`
`a.b.c from list ${lang}`,
);
cy.get(`[data-cy=p-static-lang-en]`).should('contain', `home english`);

Expand Down
10 changes: 5 additions & 5 deletions apps/transloco-playground-e2e/src/integration/locale.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ export function testLocaleContentUS() {
const date = new Date(2019, 7, 14, 0, 0, 0, 0);
const dateTimeOptions: any = { timeStyle: 'full', timeZone: 'UTC' };
const expectedFullTime = Intl.DateTimeFormat('en-US', dateTimeOptions).format(
date
date,
);

// Date Pipe
cy.get(`[data-cy=date-regular]`).should('contain', '8/14/2019');
cy.get(`[data-cy=date-long]`).should('contain', 'August 14, 2019 at');
cy.get(`[data-cy=date-full]`).should(
'contain',
'Wednesday, August 14, 2019 at'
'Wednesday, August 14, 2019 at',
);
cy.get(`[data-cy=date-full-utc]`).should('contain', expectedFullTime);
cy.get(`[data-cy=date-medium-unix]`).should('contain', 'Jan 1, 1970');
Expand All @@ -26,7 +26,7 @@ export function testLocaleContentUS() {
cy.get(`[data-cy=currency-symbol]`).should('contain', '$1,000,000.00');
cy.get(`[data-cy=currency-name]`).should(
'contain',
'1,000,000.00 US dollars'
'1,000,000.00 US dollars',
);
cy.get(`[data-cy=currency-custom-digit]`).should('contain', '$1,000,000');
}
Expand All @@ -35,15 +35,15 @@ export function testLocaleContentES() {
const date = new Date(2019, 7, 14, 0, 0, 0, 0);
const dateTimeOptions: any = { timeStyle: 'full', timeZone: 'UTC' };
const expectedFullTime = Intl.DateTimeFormat('es-ES', dateTimeOptions).format(
date
date,
);

// Date Pipe
cy.get(`[data-cy=date-regular]`).should('contain', '14/8/2019');
cy.get(`[data-cy=date-long]`).should('contain', '14 de agosto de 2019');
cy.get(`[data-cy=date-full]`).should(
'contain',
' miércoles, 14 de agosto de 2019,'
' miércoles, 14 de agosto de 2019,',
);
cy.get(`[data-cy=date-full-utc]`).should('contain', expectedFullTime);
cy.get(`[data-cy=date-medium-unix]`).should('contain', '1 ene 1970');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function testScopeSharingContent(lang = 'english') {
// Structural Directive
cy.get(`[data-cy=todos-page-scope]`).should(
'contain',
`My scope name was mapped! ${lang}`
`My scope name was mapped! ${lang}`,
);
cy.get(`[data-cy=global]`).should('contain', `home ${lang}`);

Expand All @@ -13,7 +13,7 @@ export function testScopeSharingContent(lang = 'english') {
// Pipe
cy.get(`[data-cy=p-todos-page-scope]`).should(
'contain',
`My scope name was mapped! ${lang}`
`My scope name was mapped! ${lang}`,
);
cy.get(`[data-cy=p-global]`).should('contain', `home ${lang}`);
}
34 changes: 17 additions & 17 deletions apps/transloco-playground-e2e/src/integration/transpilers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,98 +3,98 @@ export function testTranspilersContent(lang = 'english') {
cy.get(`[data-cy=regular]`).should('contain', `Home - ${lang}`);
cy.get(`[data-cy=with-params]`).should(
'contain',
`Replaces standard 🦄 - ${lang}`
`Replaces standard 🦄 - ${lang}`,
);
cy.get(`[data-cy=with-translation-reuse]`).should(
'contain',
`a.b.c from list - ${lang}`
`a.b.c from list - ${lang}`,
);
cy.get(`[data-cy=with-message-format]`).should(
'contain',
`The boy named Henkie won his race and ${
lang === 'english' ? '€1,000.00' : '1000,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
cy.get(`[data-cy=with-message-format-dynamic]`).should(
'contain',
`The girl named Kim won her race and ${
lang === 'english' ? '€2,000.00' : '2000,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
cy.get(`[data-cy=with-message-format-params]`).should(
'contain',
`Can replace transloco params and also give parse messageformat: The person named Joko won their race and ${
lang === 'english' ? '€3,000.00' : '3000,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);

// Directive
cy.get(`[data-cy=d-regular]`).should('contain', `Home - ${lang}`);
cy.get(`[data-cy=d-with-params]`).should(
'contain',
`Replaces standard 🦄 - ${lang}`
`Replaces standard 🦄 - ${lang}`,
);
cy.get(`[data-cy=d-with-translation-reuse]`).should(
'contain',
`a.b.c from list - ${lang}`
`a.b.c from list - ${lang}`,
);
cy.get(`[data-cy=d-with-message-format]`).should(
'contain',
`The boy named Pete won his race and ${
lang === 'english' ? '€1,100.00' : '1100,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
cy.get(`[data-cy=d-with-message-format-dynamic]`).should(
'contain',
`The girl named Maxime won her race and ${
lang === 'english' ? '€2,100.00' : '2100,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
cy.get(`[data-cy=d-with-message-format-params]`).should(
'contain',
`Can replace transloco params and also give parse messageformat: The person named Ono won their race and ${
lang === 'english' ? '€3,100.00' : '3100,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);

// Dynamic params
cy.get(`[data-cy=d-with-params] .pointer`).click();
cy.get(`[data-cy=d-with-params]`).should(
'contain',
`Replaces standard 🦄🦄🦄 - ${lang}`
`Replaces standard 🦄🦄🦄 - ${lang}`,
);
cy.get(`[data-cy=d-with-params] .pointer`).click();
cy.get(`[data-cy=d-with-params]`).should(
'contain',
`Replaces standard 🦄 - ${lang}`
`Replaces standard 🦄 - ${lang}`,
);

// Pipe
cy.get(`[data-cy=p-regular]`).should('contain', `Home - ${lang}`);
cy.get(`[data-cy=p-with-params]`).should(
'contain',
`Replaces standard 🦄 - ${lang}`
`Replaces standard 🦄 - ${lang}`,
);
cy.get(`[data-cy=p-with-translation-reuse]`).should(
'contain',
`a.b.c from list - ${lang}`
`a.b.c from list - ${lang}`,
);
cy.get(`[data-cy=p-with-message-format]`).should(
'contain',
`The boy named Stef won his race and ${
lang === 'english' ? '€1,200.00' : '1200,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
cy.get(`[data-cy=p-with-message-format-dynamic]`).should(
'contain',
`The girl named Donna won her race and ${
lang === 'english' ? '€2,200.00' : '2200,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
cy.get(`[data-cy=p-with-message-format-params]`).should(
'contain',
`Can replace transloco params and also give parse messageformat: The person named Mary won their race and ${
lang === 'english' ? '€3,200.00' : '3200,00\u00A0€'
} - ${lang}`
} - ${lang}`,
);
}
2 changes: 1 addition & 1 deletion apps/transloco-playground/index-html-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default (targetOptions: Target, indexHtml: string) => {
const $ = cheerio.load(indexHtml);
$('base').attr(
'href',
process.env.ORIGIN + '/transloco/transloco-playground/'
process.env.ORIGIN + '/transloco/transloco-playground/',
);

return $.html();
Expand Down
Loading

0 comments on commit 85cb958

Please sign in to comment.