Skip to content

Commit

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

* Create lucky-bananas-roll.md

* fix

* fix

* fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yosuke Ota <[email protected]>
  • Loading branch information
renovate[bot] and ota-meshi authored Jan 15, 2024
1 parent cf95ea1 commit 2e569f7
Show file tree
Hide file tree
Showing 31 changed files with 206 additions and 104 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-bananas-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-toml": minor
---

fix(deps): update dependency eslint-compat-utils to ^0.2.0
12 changes: 12 additions & 0 deletions .github/workflows/NodeCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ jobs:
run: npm install
- name: Test
run: npm test
test-with-eslint9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install Target Packages
run: |+
npm i -D eslint@^9.0.0-0 -f
npx rimraf node_modules
npm install -f
- name: Test
run: npm 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 @@ -57,7 +57,7 @@
},
"dependencies": {
"debug": "^4.1.1",
"eslint-compat-utils": "^0.1.2",
"eslint-compat-utils": "^0.2.0",
"lodash": "^4.17.19",
"toml-eslint-parser": "^0.9.0"
},
Expand Down
4 changes: 2 additions & 2 deletions tests/src/eslint-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import path from "path";
import assert from "assert";
import { getESLint } from "eslint-compat-utils";
import { getLegacyESLint } from "eslint-compat-utils/eslint";
import plugin from "../../src/index";

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

// -----------------------------------------------------------------------------
// Tests
Expand Down
14 changes: 9 additions & 5 deletions tests/src/rules-without-vue-eslint-parser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Linter } from "eslint";
import { getLinter } from "eslint-compat-utils/linter";
import plugin from "../../src/index";
import assert from "assert";
const rules = plugin.rules;
// eslint-disable-next-line @typescript-eslint/naming-convention -- class name
const Linter = getLinter();

describe("Don't crash even if without toml-eslint-parser.", () => {
const code = "{a:[1,2,3,4]}";
Expand All @@ -11,13 +13,15 @@ describe("Don't crash even if without toml-eslint-parser.", () => {

it(ruleId, () => {
const linter = new Linter();
const config: Linter.Config = {
parserOptions: { ecmaVersion: 2015 },
const config = {
languageOptions: { ecmaVersion: 2015 },
plugins: {
toml: plugin,
},
rules: {
[ruleId]: "error",
},
};
linter.defineRule(ruleId, rules[key] as any);
} as any;
const resultJs = linter.verifyAndFix(code, config, "test.js");
assert.strictEqual(resultJs.messages.length, 0);
});
Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/array-bracket-newline.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/array-bracket-newline";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/array-bracket-spacing.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/array-bracket-spacing";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/array-element-newline.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/array-element-newline";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/comma-style.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/comma-style";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/indent.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/indent";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/inline-table-curly-spacing.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/inline-table-curly-spacing";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/key-spacing.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/key-spacing";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/keys-order.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/keys-order";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/no-mixed-type-in-array.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/no-mixed-type-in-array";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/no-non-decimal-integer.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/no-non-decimal-integer";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/no-space-dots.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/no-space-dots";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/no-unreadable-number-separator.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/no-unreadable-number-separator";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/padding-line-between-pairs.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/padding-line-between-pairs";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/padding-line-between-tables.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/padding-line-between-tables";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/precision-of-fractional-seconds.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule from "../../../src/rules/precision-of-fractional-seconds";
import { loadTestCases } from "../../utils/utils";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
11 changes: 7 additions & 4 deletions tests/src/rules/precision-of-integer.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { RuleTester } from "eslint";
import { RuleTester } from "../test-lib/eslint-compat";
import rule, {
maxBitToMaxValues,
} from "../../../src/rules/precision-of-integer";
import { loadTestCases } from "../../utils/utils";
import assert from "assert";
import * as tomlParser from "toml-eslint-parser";

const tester = new RuleTester({
parser: require.resolve("toml-eslint-parser"),
parserOptions: {
tomlVersion: "next",
languageOptions: {
parser: tomlParser,
parserOptions: {
tomlVersion: "next",
},
},
});

Expand Down
Loading

0 comments on commit 2e569f7

Please sign in to comment.