Skip to content

Commit

Permalink
Meta+LibJS: Upgrade to prettier version 3.3.3
Browse files Browse the repository at this point in the history
Prettier v3 was released over a year ago, and most users will have it by
default by now.
  • Loading branch information
trflynn89 committed Nov 6, 2024
1 parent deb5947 commit 80c6268
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install JS Dependencies
shell: bash
run: npm install -g prettier@2.7.1
run: npm install -g prettier@3.3.3

- name: Lint
run: ${{ github.workspace }}/Meta/lint-ci.sh
4 changes: 2 additions & 2 deletions Meta/lint-prettier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if (( ${#files[@]} )); then
exit 1
fi

if ! prettier --version | grep -q '\b2\.' ; then
echo "You are using '$(prettier --version)', which appears to not be prettier 2."
if ! prettier --version | grep -q '\b3\.' ; then
echo "You are using '$(prettier --version)', which appears to not be prettier 3."
exit 1
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as self from "./import-with-assertions.mjs" assert { "key": "value", key2: "value2", default: "shouldwork" };
import "./import-with-assertions.mjs" assert { "key": "value", key2: "value2", default: "shouldwork" };
import * as self from "./import-with-assertions.mjs" assert { key: "value", key2: "value2", default: "shouldwork" };
import "./import-with-assertions.mjs" assert { key: "value", key2: "value2", default: "shouldwork" };

export { passed } from "./module-with-default.mjs" assert { "key": "value", key2: "value2", default: "shouldwork" };
export { passed } from "./module-with-default.mjs" assert { key: "value", key2: "value2", default: "shouldwork" };
6 changes: 4 additions & 2 deletions Userland/Libraries/LibJS/Tests/test-common-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ test("toHaveLength", () => {
expect([1]).toHaveLength(1);
expect({ length: 1 }).toHaveLength(1);

expect("a\
b").toHaveLength(2);
expect(
"a\
b"
).toHaveLength(2);

expect(() => {
expect(1).toHaveLength();
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Tests/this-value-strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe("functions on created objects", () => {

expect(obj2.func()).toBe(obj2);
expect(obj2.arrow()).toBe(customThisValue);
}.bind(customThisValue)());
}).bind(customThisValue)();
});
});

Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Tests/this-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe("functions on created objects", () => {

expect(obj2.func()).toBe(obj2);
expect(obj2.arrow()).toBe(customThisValue);
}.bind(customThisValue)());
}).bind(customThisValue)();
});
});

Expand Down

0 comments on commit 80c6268

Please sign in to comment.