Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kanziw committed Aug 14, 2024
1 parent b2bb4ad commit 2e41d8c
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"files": {
"ignore": ["node_modules/", ".yarn/", "lib/", "coverage/", "package.json", "packages/grpc-es/example/gen/"]
"ignore": ["node_modules/", ".yarn/", "lib/", "coverage/", "package.json", "packages/grpc-es/"]
},
"organizeImports": {
"enabled": true
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/pkce.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @see https://dropbox.tech/developers/pkce--what-and-why-
*/
import crypto from 'crypto'
import crypto from 'node:crypto'

interface PKCE {
codeChallengeMethod: 'S256'
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
4 changes: 2 additions & 2 deletions packages/cipher/src/aes256gcm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert'
import crypto from 'crypto'
import assert from 'node:assert'
import crypto from 'node:crypto'

import type { Cipher } from './cipher'

Expand Down
2 changes: 1 addition & 1 deletion packages/cipher/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/crypto/src/sha256.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import crypto from 'crypto'
import crypto from 'node:crypto'

export const sha256 = (str: string): Buffer => crypto.createHash('sha256').update(str).digest()
2 changes: 1 addition & 1 deletion packages/crypto/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/date/src/__tests__/isValidDate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('isValidDate', () => {
[new Date(-8640000000000000 - 1), false],
[new Date(8640000000000000 + 1), false],
[new Date(''), false],
[new Date(NaN), false],
[new Date(Number.NaN), false],
[new Date(Number.MAX_SAFE_INTEGER + 1), false],
])('isValidDate(%p) === %p', (date, expected) => {
expect(isValidDate(date)).toBe(expected)
Expand Down
2 changes: 1 addition & 1 deletion packages/date/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/error/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/promise/src/__tests__/defer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setTimeout as delay } from 'timers/promises'
import { setTimeout as delay } from 'node:timers/promises'

import { defer } from '../defer'

Expand Down
2 changes: 1 addition & 1 deletion packages/promise/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/stream/src/drain.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from 'stream'
import type { Stream } from 'node:stream'

export const drain = async (stream: Stream): Promise<Buffer> => {
const bufs: Uint8Array[] = []
Expand Down
2 changes: 1 addition & 1 deletion packages/stream/src/waitUntilFinished.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from 'stream'
import type { Stream } from 'node:stream'

export const waitUntilFinished = (stream: Stream) =>
new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/stream/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"outDir": "lib"
},
"include": ["src"]
}
4 changes: 2 additions & 2 deletions packages/time/scripts/build-exports.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs')
const path = require('path')
const fs = require('node:fs')
const path = require('node:path')
const { build } = require('esbuild')

const rootDir = path.join(__dirname, '..')
Expand Down
2 changes: 1 addition & 1 deletion packages/time/src/__tests__/timezone.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TimeFormatter, formatWithTimezoneOffset, kstFormat, utcFormat } from '../timezone'
import { type TimeFormatter, formatWithTimezoneOffset, kstFormat, utcFormat } from '../timezone'

describe('timezone', () => {
const testWithDateAndMs = (
Expand Down
2 changes: 1 addition & 1 deletion packages/time/src/stopwatch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { performance } from 'perf_hooks'
import { performance } from 'node:perf_hooks'

const startStopwatch = () => {
const start = performance.now()
Expand Down
2 changes: 1 addition & 1 deletion packages/time/src/timezone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const formatWithTimezoneOffset = (offset: Offset): ((input: Date | number
const [hours, minutes] = offset
.slice(1)
.split(':')
.map((numericString) => parseInt(numericString, 10))
.map((numericString) => Number.parseInt(numericString, 10))

return (input: Date | number) => {
const ts = typeof input === 'number' ? input : input.getTime()
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkIsPublishableVersions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { resolve } from 'node:path'
import walkSync from 'walk-sync'

const packagePaths = walkSync('packages', { globs: ['*/package.json'], includeBasePath: true })
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"sourceMap": true,
"sourceMap": true
}
}

0 comments on commit 2e41d8c

Please sign in to comment.