Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prettier to version 3.3.3 #3386

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
translate/dist/
coverage/
docs/_build/
docs/venv/
package-lock.json
specs/
?venv/

/.github/
/media/
Expand Down
2 changes: 1 addition & 1 deletion error_pages/application-error.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<link
Expand Down
2 changes: 1 addition & 1 deletion error_pages/maintenance-mode.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<link
Expand Down
49 changes: 7 additions & 42 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 @@ -79,7 +79,7 @@
"jest-each": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-watch-typeahead": "^2.2.1",
"prettier": "^2.5.1",
"prettier": "^3.3.3",
"react-intersection-observer": "^9.4.3",
"rollup": "^3.29.5",
"rollup-plugin-css-only": "^4.3.0",
Expand Down
12 changes: 6 additions & 6 deletions pontoon/machinery/static/js/machinery.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ $(function () {
return valA < valB
? 1
: valA > valB
? -1
: sourceA > sourceB
? 1
: sourceA < sourceB
? -1
: 0;
? -1
: sourceA > sourceB
? 1
: sourceA < sourceB
? -1
: 0;
});

ul.html(listitems);
Expand Down
3 changes: 2 additions & 1 deletion translate/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px var(--status-translated),
box-shadow:
0 0 10px var(--status-translated),
0 0 5px var(--status-translated);
opacity: 1;
transform: rotate(3deg) translate(0px, -4px);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export function AddonPromotion(): React.ReactElement<'div'> | null {
const downloadHref = isFirefox
? 'https://addons.mozilla.org/firefox/addon/pontoon-tools/'
: isChrome
? 'https://chrome.google.com/webstore/detail/pontoon-add-on/gnbfbnpjncpghhjmmhklfhcglbopagbb'
: '';
? 'https://chrome.google.com/webstore/detail/pontoon-add-on/gnbfbnpjncpghhjmmhklfhcglbopagbb'
: '';

// User not authenticated or promotion dismissed or add-on installed or
// page not loaded in Firefox or Chrome (add-on not available for other browsers)
Expand Down
6 changes: 5 additions & 1 deletion translate/src/modules/comments/components/AddComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ function serialize(node: Descendant, users: MentionUser[]): string {
}
}

const RenderElement = ({ attributes, children, element }: RenderElementProps) =>
const RenderElement = ({
attributes,
children,
element,
}: RenderElementProps) =>
element.type === 'mention' ? (
<span {...attributes} contentEditable={false} className='mention-element'>
@{element.character}
Expand Down
12 changes: 6 additions & 6 deletions translate/src/modules/history/components/HistoryTranslation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ export function HistoryTranslationBase({
translation.approved
? 'approved'
: translation.pretranslated
? 'pretranslated'
: translation.fuzzy
? 'fuzzy'
: translation.rejected
? 'rejected'
: 'unreviewed',
? 'pretranslated'
: translation.fuzzy
? 'fuzzy'
: translation.rejected
? 'rejected'
: 'unreviewed',
isReadOnlyEditor
? 'cannot-copy'
: { 'can-approve': isTranslator, 'can-reject': canReject },
Expand Down
4 changes: 2 additions & 2 deletions translate/src/modules/search/components/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export function SearchBoxBase({
next[filter] = Array.isArray(value)
? value
: typeof value === 'string'
? value.split(',')
: [];
? value.split(',')
: [];
}
return next;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('<EditField>', () => {
setStart() {},
getBoundingClientRect: () => ({ right: 0 }),
getClientRects: () => ({ length: 0, left: 0, right: 0 }),
} as unknown as Range);
}) as unknown as Range;
});

afterAll(() => {
Expand Down