Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
dist
archive*
dist-test
archive*
.svelte-kit
.claude
3 changes: 0 additions & 3 deletions email-verification/src/__tests__/issuance-token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ describe('IssuanceToken Functions', () => {
})

it('should throw error for missing JWK algorithm', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { alg: _alg, ...keyWithoutAlg } = rsaPrivateKey

await expect(
Expand All @@ -153,7 +152,6 @@ describe('IssuanceToken Functions', () => {
})

it('should throw error for missing JWK kid', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { kid: _kid, ...keyWithoutKid } = rsaPrivateKey

await expect(
Expand Down Expand Up @@ -295,7 +293,6 @@ describe('IssuanceToken Functions', () => {
})

it('should throw error for missing cnf.jwk claim', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { cnf: _cnf, ...payloadWithoutCnf } = testPayload

const header = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ describe('PresentationToken Functions', () => {
})

it('should throw error for invalid JWK', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { alg: _alg, ...invalidKey } = rsaBrowserKey

const issuanceTokenPayload: IssuanceTokenPayload = {
Expand Down
21 changes: 20 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ export default [
...tseslint.configs.recommended,
prettierConfig, // Disable ESLint rules that conflict with Prettier
{
ignores: ['**/dist', '**/dist-test', '**/node_modules', 'archive*/'],
ignores: [
'**/dist',
'**/dist-test',
'**/node_modules',
'**/.svelte-kit',
'archive*/',
'.claude/',
],
},
{
languageOptions: {
Expand All @@ -28,6 +35,18 @@ export default [

'@typescript-eslint/ban-ts-comment': 'off', // TBD: allow @ts-ignore comments
'@typescript-eslint/no-empty-object-type': 'off', // TBD: Auth | {} allow empty object

// Destructuring to omit members -- stripping private fields from a
// JWK, for example -- names the fields it is discarding. They are
// not unused; naming them is how the omission works.
'@typescript-eslint/no-unused-vars': [
'error',
{
ignoreRestSiblings: true,
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
]
1 change: 0 additions & 1 deletion httpsig/src/utils/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ export async function importPublicKey(jwk: JsonWebKey): Promise<CryptoKey> {
* Extract public JWK from private JWK
*/
export function getPublicJwk(privateJwk: JsonWebKey): JsonWebKey {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { d, p, q, dp, dq, qi, ...publicJwk } = privateJwk
return publicJwk
}
Expand Down
2 changes: 1 addition & 1 deletion httpsig/tests/test-jkt-jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { test } from 'node:test'
import assert from 'node:assert'
import { fetch, verify } from '../src/index.js'
import { base64urlEncode, base64urlDecode } from '../src/utils/base64.js'
import { base64urlEncode } from '../src/utils/base64.js'
import { calculateThumbprint } from '../src/utils/thumbprint.js'

/**
Expand Down
3 changes: 0 additions & 3 deletions web-identity/src/__tests__/issuance-token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ describe('IssuanceToken Functions', () => {
})

it('should throw error for missing JWK algorithm', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { alg: _alg, ...keyWithoutAlg } = rsaPrivateKey

await expect(
Expand All @@ -153,7 +152,6 @@ describe('IssuanceToken Functions', () => {
})

it('should throw error for missing JWK kid', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { kid: _kid, ...keyWithoutKid } = rsaPrivateKey

await expect(
Expand Down Expand Up @@ -295,7 +293,6 @@ describe('IssuanceToken Functions', () => {
})

it('should throw error for missing cnf.jwk claim', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { cnf: _cnf, ...payloadWithoutCnf } = testPayload

const header = {
Expand Down
1 change: 0 additions & 1 deletion web-identity/src/__tests__/presentation-token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ describe('PresentationToken Functions', () => {
})

it('should throw error for invalid JWK', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { alg: _alg, ...invalidKey } = rsaBrowserKey

const issuanceTokenPayload: IssuanceTokenPayload = {
Expand Down
2 changes: 0 additions & 2 deletions web-identity/src/__tests__/request-token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ describe('RequestToken Functions', () => {
})

it('should throw error for missing JWK algorithm', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { alg: _alg, ...keyWithoutAlg } = rsaKey

await expect(
Expand All @@ -89,7 +88,6 @@ describe('RequestToken Functions', () => {
})

it('should throw error for missing JWK kid', async () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { kid: _kid, ...keyWithoutKid } = rsaKey

await expect(
Expand Down