Skip to content

Commit

Permalink
Merge d679b2c into 48c4fea
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jan 15, 2024
2 parents 48c4fea + d679b2c commit 167294e
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-flies-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-json-schema-validator": minor
---

feat: update eslint-compat-utils
11 changes: 11 additions & 0 deletions .github/workflows/NodeCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ jobs:
run: yarn install --ignore-engines
- name: Test
run: yarn test
test-with-eslint9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install Target Packages
run: |+
yarn add -D eslint@^9.0.0-0 --ignore-engines
yarn --ignore-engines
- name: Test
run: yarn test
test-with-eslint6:
runs-on: ubuntu-latest
steps:
Expand Down
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.1.2",
"eslint-compat-utils": "^0.2.0",
"json-schema-migrate": "^2.0.0",
"jsonc-eslint-parser": "^2.0.0",
"minimatch": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/http-client/sync-http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export function syncGet(
options?: RequestOptions,
httpModulePath?: string,
): string {
return getSync(url, options, httpModulePath);
return getSync(url, options, httpModulePath) as string;
}
2 changes: 1 addition & 1 deletion tests/src/eslint-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from "path";
import assert from "assert";
import plugin from "../../src/index";
import { getESLint } from "eslint-compat-utils";
import { getESLint } from "eslint-compat-utils/eslint";
// eslint-disable-next-line @typescript-eslint/naming-convention -- Class name
const ESLint = getESLint();

Expand Down
10 changes: 6 additions & 4 deletions tests/src/rules/no-invalid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import path from "path";
import { RuleTester } from "eslint";
import { getRuleTester } from "eslint-compat-utils/rule-tester";
import rule from "../../../src/rules/no-invalid";
import { loadTestCases } from "../../utils/utils";

// eslint-disable-next-line @typescript-eslint/naming-convention -- class name
const RuleTester = getRuleTester();
const tester = new RuleTester({
parser: require.resolve("jsonc-eslint-parser"),
parserOptions: {
languageOptions: {
// eslint-disable-next-line @typescript-eslint/no-require-imports -- ignore
parser: require("jsonc-eslint-parser"),
ecmaVersion: 2020,
sourceType: "module",
},
Expand Down
2 changes: 1 addition & 1 deletion tools/render-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function renderRulesTableContent(
const link = `[${rule.meta.docs.ruleId}](${buildRulePath(
rule.meta.docs.ruleName || "",
)})`;
const replacedRules = rule.meta.docs.replacedBy || [];
const replacedRules = rule.meta.replacedBy || [];
const replacedBy = replacedRules
.map(
(name) => `[json-schema-validator/${name}](${buildRulePath(name)}.md)`,
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "./tsconfig.json",
"exclude": ["tests/**/*", "tools/**/*", "typings/**/*"],
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"removeComments": true /* Do not emit comments to output. */
}
}
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"target": "es2020",
"module": "es2020",
"moduleResolution": "Bundler",
"lib": ["es2020"],
"allowJs": true,
"checkJs": true,
Expand Down

0 comments on commit 167294e

Please sign in to comment.