Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit 360bccc

Browse files
committed
style: migrate to @bifravst/eslint-config-typescript and @bifravst/prettier-config
BREAKING CHANGE: convert to ESM
1 parent ff16956 commit 360bccc

10 files changed

Lines changed: 1396 additions & 1102 deletions

.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

api-verification/agnss.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
AGNSSMessage,
2+
type AGNSSMessage,
33
SCHEMA_VERSION,
44
verify,
55
} from '../src/verify-agnss-data.js'

api-verification/api-client.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IncomingMessage, OutgoingHttpHeaders } from 'http'
1+
import { IncomingMessage, type OutgoingHttpHeaders } from 'http'
22
import * as https from 'https'
33
import * as jwt from 'jsonwebtoken'
44
import { URL, URLSearchParams } from 'url'
@@ -69,7 +69,9 @@ export const apiClient = ({
6969
),
7070
'',
7171
`< ${res.statusCode} ${res.statusMessage}`,
72-
...Object.entries(res.headers).map(([k, v]) => `< ${k}: ${v}`),
72+
...Object.entries(res.headers).map(
73+
([k, v]): string => `< ${k}: ${JSON.stringify(v)}`,
74+
),
7375
'<',
7476
`< ${response.join('')}`,
7577
].join('\n'),
@@ -124,7 +126,9 @@ export const apiClient = ({
124126
),
125127
'',
126128
`< ${res.statusCode} ${res.statusMessage}`,
127-
...Object.entries(res.headers).map(([k, v]) => `< ${k}: ${v}`),
129+
...Object.entries(res.headers).map(
130+
([k, v]) => `< ${k}: ${JSON.stringify(v)}`,
131+
),
128132
'<',
129133
`< ${Buffer.concat(response).toString('hex')}`,
130134
].join('\n'),
@@ -186,11 +190,13 @@ export const apiClient = ({
186190
: ''
187191
}`,
188192
...Object.entries(options.headers).map(
189-
([k, v]) => `> ${k}: ${v}`,
193+
([k, v]) => `> ${k}: ${JSON.stringify(v)}`,
190194
),
191195
'',
192196
`< ${res.statusCode} ${res.statusMessage}`,
193-
...Object.entries(res.headers).map(([k, v]) => `< ${k}: ${v}`),
197+
...Object.entries(res.headers).map(
198+
([k, v]): string => `< ${k}: ${JSON.stringify(v)}`,
199+
),
194200
'<',
195201
...debugResponse(data),
196202
].join('\n'),

api-verification/pgps.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IncomingHttpHeaders } from 'http'
1+
import type { IncomingHttpHeaders } from 'http'
22
import * as https from 'https'
33
import { apiClient, tokenAuthorization } from './api-client.js'
44
import { describe, it } from 'node:test'

commitlint.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = { extends: ['@commitlint/config-conventional'] }
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import config from '@bifravst/eslint-config-typescript'
2+
export default [...config, { ignores: ['dist/**'] }]

0 commit comments

Comments
 (0)