Skip to content

Commit

Permalink
fix(deps): update dependency eslint-compat-utils to ^0.3.0 (#284)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency eslint-compat-utils to ^0.3.0

* Create tidy-queens-sit.md

* fix

* fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
  • Loading branch information
renovate[bot] and ota-meshi committed Jan 16, 2024
1 parent ea48ffb commit 09063c6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-queens-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-json-schema-validator": patch
---

fix(deps): update dependency eslint-compat-utils to ^0.3.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@eslint-community/eslint-utils": "^4.3.0",
"ajv": "^8.0.0",
"debug": "^4.3.1",
"eslint-compat-utils": "^0.2.0",
"eslint-compat-utils": "^0.3.0",
"json-schema-migrate": "^2.0.0",
"jsonc-eslint-parser": "^2.0.0",
"minimatch": "^8.0.0",
Expand Down
38 changes: 16 additions & 22 deletions tests/src/eslint-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
import path from "path";
import assert from "assert";
import plugin from "../../src/index";
import { Linter } from "eslint";
import semver from "semver";
import { getESLint } from "eslint-compat-utils/eslint";
// eslint-disable-next-line @typescript-eslint/naming-convention -- Class name
const ESLint = getESLint();
import { getLegacyESLint } from "eslint-compat-utils/eslint";

// eslint-disable-next-line @typescript-eslint/naming-convention -- Class name
const ESLint = getLegacyESLint();
// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------

const TEST_CWD = path.join(__dirname, "../fixtures/integrations/eslint-plugin");

if (semver.lt(Linter.version, "9.0.0-0"))
describe("Integration with eslint-plugin-json-schema-validator", () => {
it("should lint without errors", async () => {
const engine = new ESLint({
cwd: TEST_CWD,
extensions: [".js", ".json"],
overrideConfig: {
files: ["**/*.js", "**/*.json", "*.js", "*.json"],
plugins: { "json-schema-validator": plugin },
} as any,
});
const results = await engine.lintFiles(["test01/src"]);
assert.strictEqual(results.length, 2);
assert.strictEqual(
results.reduce((s, r) => s + r.errorCount, 0),
0,
);
describe("Integration with eslint-plugin-json-schema-validator", () => {
it("should lint without errors", async () => {
const engine = new ESLint({
cwd: TEST_CWD,
extensions: [".js", ".json"],
plugins: { "json-schema-validator": plugin as any },
});
const results = await engine.lintFiles(["test01/src"]);
assert.strictEqual(results.length, 2);
assert.strictEqual(
results.reduce((s, r) => s + r.errorCount, 0),
0,
);
});
});

0 comments on commit 09063c6

Please sign in to comment.