From 631a9da94cfa4230a9ab3c3d0124194a9b354add Mon Sep 17 00:00:00 2001 From: patrikjuvonen <22572159+patrikjuvonen@users.noreply.github.com> Date: Thu, 21 Apr 2022 12:10:00 +0300 Subject: [PATCH] Upgrade dev dependencies and tests --- package.json | 10 +++++----- test/index.js | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 616681a..d579c5d 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "url": "https://github.com/standard/eslint-config-semistandard/issues" }, "devDependencies": { - "eslint": "^7.28.0", - "eslint-config-standard": "^16.0.3", - "eslint-plugin-import": "^2.23.4", + "eslint": "^8.13.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.1.0", + "eslint-plugin-promise": "^6.0.0", "tap-spec": "^5.0.0", - "tape": "^5.0.0" + "tape": "^5.5.3" }, "homepage": "https://github.com/standard/eslint-config-semistandard", "keywords": [ diff --git a/test/index.js b/test/index.js index 1ff0ad0..4ff70d5 100644 --- a/test/index.js +++ b/test/index.js @@ -1,13 +1,13 @@ 'use strict'; -const { CLIEngine } = require('eslint'); +const { ESLint } = require('eslint'); const test = require('tape'); -const configFile = require.resolve('../eslintrc.json'); -const linter = new CLIEngine({ configFile }); +const overrideConfigFile = require.resolve('../eslintrc.json'); +const linter = new ESLint({ overrideConfigFile }); -test('api: lintText', t => { +test('api: lintText', async t => { t.plan(1); - const result = linter.executeOnText("console.log('hi there')\n\n"); - t.equals(result.results[0].messages[0].message, 'Missing semicolon.'); + const [result] = await linter.lintText("console.log('hi there')\n\n"); + t.equal(result.messages[0].message, 'Missing semicolon.'); });