Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 7bd08ef

Browse files
committed
Merge branch 'rome'
2 parents 05f33d2 + 72dc9fb commit 7bd08ef

File tree

13 files changed

+246
-64
lines changed

13 files changed

+246
-64
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ jobs:
1818
node-version: ${{ matrix.node-version }}
1919
- run: npm install
2020
- run: make test
21+
- run: make lint
22+
- run: make format

package-lock.json

Lines changed: 186 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"barely-a-dev-server": "^0.2.6",
3636
"esbuild": "^0.14.11",
3737
"jest": "^27.4.7",
38-
"prettier": "^2.5.1",
3938
"ts-jest": "^27.1.2",
4039
"typescript": "^4.5.4"
4140
},
@@ -47,8 +46,8 @@
4746
"dev": "node script/dev.js",
4847
"clean": "rm -rf ./.temp ./dist",
4948
"test": "npx jest && npm run lint",
50-
"lint": "npx prettier --check src",
51-
"format": "npx prettier --write src",
49+
"lint": "npx rome check src",
50+
"format": "npx rome format --write src",
5251
"prepack": "npm run clean && npm run build",
5352
"postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'"
5453
},
@@ -67,12 +66,6 @@
6766
"^.+\\.ts$": "ts-jest"
6867
}
6968
},
70-
"prettier": {
71-
"semi": true,
72-
"trailingComma": "all",
73-
"tabWidth": 2,
74-
"quoteProps": "consistent"
75-
},
7669
"files": [
7770
"/LICENSE.md",
7871
"/README.md",
@@ -82,5 +75,8 @@
8275
"/browser-ponyfill/**/*",
8376
"/extended/**/*",
8477
"/src/webauthn-json/**/*"
85-
]
78+
],
79+
"dependencies": {
80+
"rome": "^0.9.2-next"
81+
}
8682
}

rome.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"formatter": {
3+
"indentStyle": "space",
4+
"indentSize": 2
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"js": {
10+
"recommended": true
11+
},
12+
"ts": {
13+
"recommended": true
14+
}
15+
}
16+
}
17+
}

src/dev/demo/index.ts

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ import {
1717
} from "../../webauthn-json/browser-ponyfill";
1818

1919
function registeredCredentials(): PublicKeyCredentialDescriptorJSON[] {
20-
return getRegistrations().map((reg) => ({
21-
id: reg.rawId,
22-
type: reg.type,
23-
}));
20+
return getRegistrations().map(
21+
(reg) => ({
22+
id: reg.rawId,
23+
type: reg.type,
24+
}),
25+
);
2426
}
2527

2628
async function register(): Promise<void> {
@@ -68,21 +70,22 @@ async function testSupported() {
6870

6971
window.addEventListener("load", () => {
7072
try {
71-
document
72-
.querySelector("#register")!
73-
.addEventListener("click", withStatus("#register .status", register));
74-
document
75-
.querySelector("#authenticate")!
76-
.addEventListener(
77-
"click",
78-
withStatus("#authenticate .status", authenticate),
79-
);
80-
document
81-
.querySelector("#clear")!
82-
.addEventListener("click", withStatus("#clear .status", clear));
83-
document
84-
.querySelector("#supported")!
85-
.addEventListener("click", testSupported);
73+
document.querySelector("#register")!.addEventListener(
74+
"click",
75+
withStatus("#register .status", register),
76+
);
77+
document.querySelector("#authenticate")!.addEventListener(
78+
"click",
79+
withStatus("#authenticate .status", authenticate),
80+
);
81+
document.querySelector("#clear")!.addEventListener(
82+
"click",
83+
withStatus("#clear .status", clear),
84+
);
85+
document.querySelector("#supported")!.addEventListener(
86+
"click",
87+
testSupported,
88+
);
8689
} catch (e) {
8790
console.error(e);
8891
}

0 commit comments

Comments
 (0)