diff --git a/package-lock.json b/package-lock.json index 88a6e6e26..e288c2b81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-unicorn": "^51.0.1", + "eslint-plugin-unicorn": "^52.0.0", "husky": "^9.0.11", "jest": "^29.7.0", "lint-staged": "^15.2.2", @@ -2858,9 +2858,9 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "51.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", - "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", + "version": "52.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz", + "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", @@ -8662,9 +8662,9 @@ "requires": {} }, "eslint-plugin-unicorn": { - "version": "51.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", - "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", + "version": "52.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-52.0.0.tgz", + "integrity": "sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.22.20", diff --git a/package.json b/package.json index 68cca4494..a22ca2833 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-unicorn": "^51.0.1", + "eslint-plugin-unicorn": "^52.0.0", "husky": "^9.0.11", "jest": "^29.7.0", "lint-staged": "^15.2.2", diff --git a/scripts/generate-parser-feedback-test/index.ts b/scripts/generate-parser-feedback-test/index.ts index 8ddc093e8..51677c0a9 100644 --- a/scripts/generate-parser-feedback-test/index.ts +++ b/scripts/generate-parser-feedback-test/index.ts @@ -1,5 +1,5 @@ import { readFile, writeFile } from 'node:fs/promises'; -import { basename } from 'node:path'; +import path from 'node:path'; import { Parser, type DefaultTreeAdapterMap, type TreeAdapterTypeMap, type Token, defaultTreeAdapter } from 'parse5'; import type { HtmlLibToken } from 'parse5-test-utils/utils/generate-tokenization-tests.js'; import { parseDatFile } from 'parse5-test-utils/utils/parse-dat-file.js'; @@ -8,7 +8,7 @@ import { addSlashes } from 'parse5-test-utils/utils/common.js'; for (const file of process.argv.slice(2)) { const content = await readFile(file, 'utf8'); const feedbackTestContent = generateParserFeedbackTest(content); - const feedbackTestFile = `test/data/parser-feedback/${basename(file, '.dat')}.test`; + const feedbackTestFile = `test/data/parser-feedback/${path.basename(file, '.dat')}.test`; await writeFile(feedbackTestFile, feedbackTestContent); } diff --git a/test/utils/generate-location-info-parser-tests.ts b/test/utils/generate-location-info-parser-tests.ts index 5e07a2cbd..80eea6f8a 100644 --- a/test/utils/generate-location-info-parser-tests.ts +++ b/test/utils/generate-location-info-parser-tests.ts @@ -1,6 +1,6 @@ import * as assert from 'node:assert'; import * as fs from 'node:fs'; -import * as path from 'node:path'; +import path from 'node:path'; import { type TreeAdapterTypeMap, type TreeAdapter, type ParserOptions, type Token, serializeOuter } from 'parse5'; import { removeNewLines, diff --git a/test/utils/generate-parsing-tests.ts b/test/utils/generate-parsing-tests.ts index 5e945b5f7..420c49586 100644 --- a/test/utils/generate-parsing-tests.ts +++ b/test/utils/generate-parsing-tests.ts @@ -1,6 +1,6 @@ import type { ParserOptions, TreeAdapter, TreeAdapterTypeMap, ParserError } from 'parse5'; import * as fs from 'node:fs'; -import * as path from 'node:path'; +import path from 'node:path'; import * as assert from 'node:assert'; import { serializeToDatFileFormat } from './serialize-to-dat-file-format.js'; import { generateTestsForEachTreeAdapter } from './common.js'; diff --git a/test/utils/generate-tokenization-tests.ts b/test/utils/generate-tokenization-tests.ts index 76893723d..c5d715e8e 100644 --- a/test/utils/generate-tokenization-tests.ts +++ b/test/utils/generate-tokenization-tests.ts @@ -1,6 +1,6 @@ import * as assert from 'node:assert'; import * as fs from 'node:fs'; -import * as path from 'node:path'; +import path from 'node:path'; import type { ParserError, Token } from 'parse5'; import { type Tokenizer, TokenizerMode, type TokenHandler } from 'parse5'; import { makeChunks } from './common.js'; diff --git a/test/utils/load-sax-parser-test-data.ts b/test/utils/load-sax-parser-test-data.ts index 9c1d49f6c..e0c5651a5 100644 --- a/test/utils/load-sax-parser-test-data.ts +++ b/test/utils/load-sax-parser-test-data.ts @@ -1,5 +1,5 @@ import * as fs from 'node:fs'; -import * as path from 'node:path'; +import path from 'node:path'; import { normalizeNewLine } from './common.js'; export function loadSAXParserTestData(): { name: string; src: string; expected: string }[] {