Skip to content

Commit 75caee9

Browse files
chore(deps-dev): update eslint dependency (#41)
1 parent ec84a87 commit 75caee9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"devDependencies": {
2121
"@eslint-community/eslint-plugin-mysticatea": "^15.3.0",
2222
"@rollup/plugin-node-resolve": "^14.1.0",
23-
"@types/eslint": "^6.8.1",
23+
"@types/eslint": "^8.4.10",
2424
"@types/jsdom": "^16.2.15",
2525
"@types/mocha": "^9.1.1",
2626
"@types/node": "^12.20.55",
2727
"dts-bundle": "^0.7.3",
28-
"eslint": "^6.8.0",
28+
"eslint": "^8.31.0",
2929
"jsdom": "^19.0.0",
3030
"mocha": "^9.2.2",
3131
"npm-run-all": "^4.1.5",

scripts/update-unicode-ids.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "fs"
22
import http from "http"
3-
import { CLIEngine } from "eslint"
3+
import { ESLint } from "eslint"
44

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

110110
logger.log("Formatting code...")
111-
const engine = new CLIEngine({
111+
const engine = new ESLint({
112112
fix: true,
113-
rules: { curly: "off" },
113+
baseConfig: { rules: { curly: "off" } },
114114
})
115-
const result = engine.executeOnText(code, "ids.ts").results[0]
115+
const [result] = await engine.lintText(code, { filePath: "ids.ts" })
116116
code = result.output ?? code
117117

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

scripts/update-unicode-properties.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from "fs"
22
import type { DOMWindow } from "jsdom"
33
import { JSDOM } from "jsdom"
4-
import { CLIEngine } from "eslint"
4+
import { ESLint } from "eslint"
55

66
const DataSources = [
77
{
@@ -141,8 +141,8 @@ export function isValidLoneUnicodeProperty(version: number, value: string): bool
141141
`
142142

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

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

0 commit comments

Comments
 (0)