Skip to content

Commit 2b0efd7

Browse files
authored
style: fix lint warnings (#1069)
1 parent 2e9f718 commit 2b0efd7

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

example/anime-girl-quality.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const fs = require('fs').promises
2-
const { join } = require('path')
3-
const { performance } = require('perf_hooks')
1+
const fs = require('node:fs/promises')
2+
const { join } = require('node:path')
43

54
const { createCanvas, Image } = require('../index')
65
/* eslint-disable no-console */

example/export-svg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { readFileSync, writeFileSync } = require('fs')
2-
const { join } = require('path')
1+
const { writeFileSync } = require('node:fs/promises')
2+
const { join } = require('node:path')
33

44
const { createCanvas, GlobalFonts, SvgExportFlag } = require('../index.js')
55

example/path-empty-line-to.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fs = require('fs').promises
22
const { join } = require('path')
33

4-
const { createCanvas, Image } = require('../index')
4+
const { createCanvas } = require('../index')
55
/* eslint-disable no-console */
66

77
async function main() {

geometry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ class DOMMatrix {
473473
console.info([mat.slice(0, 4), mat.slice(4, 8), mat.slice(8, 12), mat.slice(12, 16)])
474474
}
475475

476-
[inspect.custom](depth, options) {
476+
[inspect.custom](depth) {
477477
if (depth < 0) return '[DOMMatrix]'
478478

479479
const { a, b, c, d, e, f, is2D, isIdentity } = this

scripts/debug-memory.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { join } from 'node:path'
21
import { createRequire } from 'node:module'
32
import { setTimeout } from 'node:timers/promises'
43

@@ -28,7 +27,7 @@ function paint() {
2827
const initial = process.memoryUsage()
2928

3029
async function main() {
31-
for (const [index, _] of Array.from({ length: 100 }).entries()) {
30+
for (const _ of Array.from({ length: 100 })) {
3231
displayMemoryUsageFromNode(initial)
3332
await setTimeout(100)
3433
global?.gc?.()

0 commit comments

Comments
 (0)