Skip to content

Commit a34a5c2

Browse files
marc0oloclaude
andcommitted
style(frontend): run prettier on ic_vetkeys
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2323844 commit a34a5c2

File tree

8 files changed

+84
-81
lines changed

8 files changed

+84
-81
lines changed

frontend/ic_vetkeys/CHANGELOG.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
created by the caller before being passed in — this avoids the deprecated
1919
`new HttpAgent(options)` constructor and allows full configuration upfront,
2020
including providing the network's root key for local development:
21-
```ts
22-
const agent = await HttpAgent.create({
23-
host,
24-
identity,
25-
...(rootKey ? { rootKey } : {}), // rootKey from ic_env cookie in local dev
26-
});
27-
new DefaultEncryptedMapsClient(agent, canisterId);
28-
```
21+
22+
```ts
23+
const agent = await HttpAgent.create({
24+
host,
25+
identity,
26+
...(rootKey ? { rootKey } : {}), // rootKey from ic_env cookie in local dev
27+
});
28+
new DefaultEncryptedMapsClient(agent, canisterId);
29+
```
2930

3031
- Make `DerivedKeyMaterial.deriveAesGcmCryptoKey` `@internal`.
3132

@@ -41,7 +42,7 @@
4142

4243
### Changed
4344

44-
- Bump `@dfinity` agent-related packages to major version `3`.
45+
- Bump `@dfinity` agent-related packages to major version `3`.
4546

4647
## [0.3.0] - 2025-06-30
4748

@@ -58,9 +59,11 @@
5859
## [0.2.0] - 2025-06-08
5960

6061
### Fixed
62+
6163
- Links in code docs.
6264

6365
### Changed
66+
6467
- The code docs now live on github.io.
6568
- Replaces some instances of `window` with `globalThis` in a few places for better node compatibility.
6669

frontend/ic_vetkeys/eslint.config.mjs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import eslint from "@eslint/js";
44
import tseslint from "typescript-eslint";
55
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
6-
import { fileURLToPath } from 'url';
7-
import path from 'path';
6+
import { fileURLToPath } from "url";
7+
import path from "path";
88

99
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1010

@@ -13,30 +13,30 @@ export default tseslint.config(
1313
tseslint.configs.recommendedTypeChecked,
1414
eslintPluginPrettierRecommended,
1515
{
16-
languageOptions: {
17-
parserOptions: {
18-
project: path.resolve(__dirname, "tsconfig.tests.json"),
19-
tsconfigRootDir: __dirname,
16+
languageOptions: {
17+
parserOptions: {
18+
project: path.resolve(__dirname, "tsconfig.tests.json"),
19+
tsconfigRootDir: __dirname,
20+
},
21+
},
22+
rules: {
23+
"@typescript-eslint/naming-convention": [
24+
"error",
25+
{
26+
selector: "variableLike",
27+
format: ["camelCase"],
28+
},
29+
{
30+
selector: "variable",
31+
modifiers: ["const"],
32+
format: ["camelCase", "UPPER_CASE"],
33+
},
34+
{
35+
selector: "typeLike",
36+
format: ["PascalCase"],
37+
},
38+
],
2039
},
21-
},
22-
rules: {
23-
'@typescript-eslint/naming-convention': [
24-
'error',
25-
{
26-
selector: 'variableLike',
27-
format: ['camelCase'],
28-
},
29-
{
30-
selector: 'variable',
31-
modifiers: ['const'],
32-
format: ['camelCase', 'UPPER_CASE'],
33-
},
34-
{
35-
selector: 'typeLike',
36-
format: ['PascalCase'],
37-
},
38-
],
39-
},
4040
},
4141
{
4242
ignores: [

frontend/ic_vetkeys/src/encrypted_maps/encrypted_maps_canister.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ async function newEncryptedMaps(
2626
});
2727
const canisterId =
2828
process.env.CANISTER_ID_IC_VETKEYS_ENCRYPTED_MAPS_CANISTER;
29-
if (!canisterId) throw new Error("CANISTER_ID_IC_VETKEYS_ENCRYPTED_MAPS_CANISTER is not set");
29+
if (!canisterId)
30+
throw new Error(
31+
"CANISTER_ID_IC_VETKEYS_ENCRYPTED_MAPS_CANISTER is not set",
32+
);
3033
return new EncryptedMaps(new DefaultEncryptedMapsClient(agent, canisterId));
3134
}
3235

frontend/ic_vetkeys/src/key_manager/key_manager_canister.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ async function newKeyManager(id: Ed25519KeyIdentity): Promise<KeyManager> {
2323
shouldFetchRootKey: true,
2424
});
2525
const canisterId = process.env.CANISTER_ID_IC_VETKEYS_MANAGER_CANISTER;
26-
if (!canisterId) throw new Error("CANISTER_ID_IC_VETKEYS_MANAGER_CANISTER is not set");
26+
if (!canisterId)
27+
throw new Error("CANISTER_ID_IC_VETKEYS_MANAGER_CANISTER is not set");
2728
return new KeyManager(new DefaultKeyManagerClient(agent, canisterId));
2829
}
2930

frontend/ic_vetkeys/tsconfig.json

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
{
2-
"compilerOptions": {
3-
"target": "ES2020",
4-
"useDefineForClassFields": true,
5-
"module": "ES2020",
6-
"declaration": true,
7-
"outDir": "dist/types",
8-
"lib": [
9-
"ES2020",
10-
"DOM",
11-
"DOM.Iterable"
12-
],
13-
"skipLibCheck": true,
14-
/* Bundler mode */
15-
"moduleResolution": "bundler",
16-
"allowImportingTsExtensions": true,
17-
"isolatedModules": true,
18-
"moduleDetection": "force",
19-
"noEmit": true,
20-
"noUncheckedSideEffectImports": true,
21-
},
22-
"include": [
23-
"src"
24-
],
25-
}
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ES2020",
6+
"declaration": true,
7+
"outDir": "dist/types",
8+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
9+
"skipLibCheck": true,
10+
/* Bundler mode */
11+
"moduleResolution": "bundler",
12+
"allowImportingTsExtensions": true,
13+
"isolatedModules": true,
14+
"moduleDetection": "force",
15+
"noEmit": true,
16+
"noUncheckedSideEffectImports": true
17+
},
18+
"include": ["src"]
19+
}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// tsconfig.tests.json (for lint/type-checking)
22
{
3-
"extends": "./tsconfig.json",
4-
"include": [
5-
"src",
6-
"src/**/*.test.ts",
7-
"test/**/*.ts"
8-
]
3+
"extends": "./tsconfig.json",
4+
"include": ["src", "src/**/*.test.ts", "test/**/*.ts"]
95
}

frontend/ic_vetkeys/typedoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
],
77
"excludeInternal": true,
88
"excludeExternals": true,
9-
"includeVersion": true,
9+
"includeVersion": true
1010
}

frontend/ic_vetkeys/vite.config.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
import { defineConfig } from 'vite';
2-
import path from 'path';
3-
import dts from 'vite-plugin-dts'
1+
import { defineConfig } from "vite";
2+
import path from "path";
3+
import dts from "vite-plugin-dts";
44

55
export default defineConfig({
6-
plugins: [dts({ outDir: 'dist/types' })],
6+
plugins: [dts({ outDir: "dist/types" })],
77
build: {
88
lib: {
99
entry: {
10-
index: path.resolve(__dirname, 'src/index.ts'),
11-
key_manager: path.resolve(__dirname, 'src/key_manager/index.ts'),
12-
encrypted_maps: path.resolve(__dirname, 'src/encrypted_maps/index.ts'),
10+
index: path.resolve(__dirname, "src/index.ts"),
11+
key_manager: path.resolve(
12+
__dirname,
13+
"src/key_manager/index.ts",
14+
),
15+
encrypted_maps: path.resolve(
16+
__dirname,
17+
"src/encrypted_maps/index.ts",
18+
),
1319
},
14-
name: 'ic_vetkeys',
15-
formats: ['es'],
20+
name: "ic_vetkeys",
21+
formats: ["es"],
1622
fileName: (format, entryName) => `${entryName}.${format}.js`,
1723
},
18-
outDir: 'dist/lib',
19-
emptyOutDir: true
24+
outDir: "dist/lib",
25+
emptyOutDir: true,
2026
},
2127
test: {
2228
environment: "happy-dom",
23-
setupFiles: ['test/setup.ts'],
24-
testTimeout: 120000
25-
}
29+
setupFiles: ["test/setup.ts"],
30+
testTimeout: 120000,
31+
},
2632
});

0 commit comments

Comments
 (0)