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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"devDependencies": {
"@eslint-community/eslint-plugin-mysticatea": "^15.3.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"@types/eslint": "^6.8.1",
"@types/eslint": "^8.4.10",
"@types/jsdom": "^16.2.15",
"@types/mocha": "^9.1.1",
"@types/node": "^12.20.55",
"dts-bundle": "^0.7.3",
"eslint": "^6.8.0",
"eslint": "^8.31.0",
"jsdom": "^19.0.0",
"mocha": "^9.2.2",
"npm-run-all": "^4.1.5",
Expand Down
8 changes: 4 additions & 4 deletions scripts/update-unicode-ids.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs"
import http from "http"
import { CLIEngine } from "eslint"
import { ESLint } from "eslint"

const DB_URL = "http://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt"
const FILE_PATH = "src/unicode/ids.ts"
Expand Down Expand Up @@ -108,11 +108,11 @@ function restoreRanges(data: string): number[] {
`

logger.log("Formatting code...")
const engine = new CLIEngine({
const engine = new ESLint({
fix: true,
rules: { curly: "off" },
baseConfig: { rules: { curly: "off" } },
})
const result = engine.executeOnText(code, "ids.ts").results[0]
const [result] = await engine.lintText(code, { filePath: "ids.ts" })
code = result.output ?? code

logger.log("Writing '%s'...", FILE_PATH)
Expand Down
6 changes: 3 additions & 3 deletions scripts/update-unicode-properties.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from "fs"
import type { DOMWindow } from "jsdom"
import { JSDOM } from "jsdom"
import { CLIEngine } from "eslint"
import { ESLint } from "eslint"

const DataSources = [
{
Expand Down Expand Up @@ -141,8 +141,8 @@ export function isValidLoneUnicodeProperty(version: number, value: string): bool
`

logger.log("Formatting code...")
const engine = new CLIEngine({ fix: true })
const result = engine.executeOnText(code, "properties.ts").results[0]
const engine = new ESLint({ fix: true })
const [result] = await engine.lintText(code, { filePath: "properties.ts" })
code = result.output ?? code

logger.log("Writing '%s'...", FILE_PATH)
Expand Down