Skip to content

Commit

Permalink
style: Apply updated Prettier rules
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Feb 28, 2024
1 parent b16af46 commit c1a6c53
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
5 changes: 4 additions & 1 deletion fluent-bundle/src/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,5 +542,8 @@ export class FluentResource {
}

class Indent {
constructor(public value: string, public length: number) {}
constructor(
public value: string,
public length: number
) {}
}
2 changes: 1 addition & 1 deletion fluent-react/example/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
8 changes: 6 additions & 2 deletions fluent-react/test/localized_valid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ describe("Localized - validation", () => {
jest.spyOn(console, "warn").mockImplementation(() => {});
const mockReportError = jest.fn();
const renderer = TestRenderer.create(
<LocalizationProvider l10n={new ReactLocalization([], null, mockReportError)}>
<LocalizationProvider
l10n={new ReactLocalization([], null, mockReportError)}
>
<Localized>
<div />
</Localized>
Expand All @@ -128,6 +130,8 @@ describe("Localized - validation", () => {

expect(renderer.toJSON()).toMatchInlineSnapshot(`<div />`);
expect(console.warn.mock.calls).toMatchInlineSnapshot(`[]`);
expect(mockReportError).toHaveBeenCalledWith(new Error('No string id was provided when localizing a component.'));
expect(mockReportError).toHaveBeenCalledWith(
new Error("No string id was provided when localizing a component.")
);
});
});
9 changes: 6 additions & 3 deletions tools/perf/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ exports.mean = function mean(elems) {

exports.stdev = function stdev(elems, mean) {
var stdev =
elems.reduce(function (prev, curr) {
return prev + Math.pow(curr - mean, 2);
}, Math.pow(elems[0] - mean, 2)) /
elems.reduce(
function (prev, curr) {
return prev + Math.pow(curr - mean, 2);
},
Math.pow(elems[0] - mean, 2)
) /
(elems.length - 1);
return +Math.sqrt(stdev).toFixed(2);
};
Expand Down

0 comments on commit c1a6c53

Please sign in to comment.