-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update dependency eslint-compat-utils to ^0.3.0 (#284)
* 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
1 parent
ea48ffb
commit 09063c6
Showing
3 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
); | ||
}); | ||
}); |