Skip to content

Commit

Permalink
Update Prettier to 3.0.3
Browse files Browse the repository at this point in the history
I am going to introduce a submodule and want to make use of a
.prettierignore file to tell Prettier to ignore it. However, we are
already overriding the --ignore-path flag to tell it to ignore the files
described by .gitignore.

Prettier 3 ignores the files described by .gitignore by default. This
means that we can now remove our usage of --ignore-path and it’ll ignore
the files described by .gitignore _and_ .prettierignore.
  • Loading branch information
lawrence-forooghian committed Oct 19, 2023
1 parent 944109d commit 60a8a0b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
Expand Down
2 changes: 1 addition & 1 deletion demo/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
18 changes: 9 additions & 9 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format": "prettier --write --ignore-path .gitignore src demo __mocks__",
"format:check": "prettier --check --ignore-path .gitignore src demo __mocks__",
"format": "prettier --write src demo __mocks__",
"format:check": "prettier --check src demo __mocks__",
"test": "vitest run",
"test:watch": "vitest watch",
"coverage": "vitest run --coverage",
Expand Down Expand Up @@ -50,7 +50,7 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^46.7.0",
"eslint-plugin-security": "^1.7.1",
"prettier": "^2.8.3",
"prettier": "^3.0.3",
"rollup": "^3.28.0",
"ts-node": "^10.9.1",
"typedoc": "^0.25.2",
Expand Down
5 changes: 4 additions & 1 deletion src/Locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export default class Locations extends EventEmitter<LocationsEventMap> {
private lastLocationUpdate: Record<string, PresenceMember['data']['locationUpdate']['id']> = {};

/** @internal */
constructor(private space: Space, private presenceUpdate: Space['presenceUpdate']) {
constructor(
private space: Space,
private presenceUpdate: Space['presenceUpdate'],
) {
super();
}

Expand Down
5 changes: 4 additions & 1 deletion src/Locks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ export default class Locks extends EventEmitter<LocksEventMap> {
private locks: Map<string, Map<string, Lock>>;

/** @internal */
constructor(private space: Space, private presenceUpdate: Space['presenceUpdate']) {
constructor(
private space: Space,
private presenceUpdate: Space['presenceUpdate'],
) {
super();
this.locks = new Map();
}
Expand Down

0 comments on commit 60a8a0b

Please sign in to comment.