diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db78e440a..23c105a71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,14 +48,14 @@ jobs: strategy: matrix: os: [ubuntu-latest] - eslint: [9] + eslint: [9.15.0, 9.x, 10.x] node: [25.x, 24.x, 22.x, 20.x, "20.19.0"] include: - os: windows-latest - eslint: 9 + eslint: latest node: lts/* - os: macOS-latest - eslint: 9 + eslint: latest node: lts/* runs-on: ${{ matrix.os }} steps: @@ -69,8 +69,8 @@ jobs: run: npm install env: CI: true - - name: Install ESLint@${{ matrix.eslint }} - run: npm install eslint@${{ matrix.eslint }} + - name: Install ESLint@${{ matrix.eslint }} + run: npm install -D eslint@${{ matrix.eslint }} @eslint/js@${{ matrix.eslint }} - name: Test run: npm run test diff --git a/examples/react/package.json b/examples/react/package.json index 59fd31acd..0cd1649e5 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -5,9 +5,9 @@ "test": "eslint ." }, "devDependencies": { - "@eslint/js": "^9.7.0", - "eslint": "^9.7.0", - "eslint-plugin-react": "^7.35.0", + "@eslint/js": "^9.39.4", + "eslint": "^9.39.4", + "eslint-plugin-react": "^7.37.5", "globals": "^13.24.0" } } diff --git a/examples/typescript/package.json b/examples/typescript/package.json index 5b06f27a2..fe1d19147 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -5,9 +5,9 @@ "test": "eslint ." }, "devDependencies": { - "@eslint/js": "^9.7.0", - "eslint": "^9.15.0", - "typescript": "^5.8.3", - "typescript-eslint": "^8.15.0" + "@eslint/js": "^10.0.1", + "eslint": "^10.0.3", + "typescript": "^5.9.3", + "typescript-eslint": "^8.57.0" } } diff --git a/package.json b/package.json index 09c5848a4..9c23a20d9 100644 --- a/package.json +++ b/package.json @@ -74,14 +74,15 @@ }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.2", - "@eslint/js": "^9.39.4", - "@eslint/json": "^0.14.0", + "@eslint/js": "^10.0.1", + "@eslint/json": "^1.1.0", "@types/mdast": "^4.0.4", "@types/unist": "^3.0.3", "c8": "^11.0.0", "dedent": "^1.7.1", - "eslint": "^9.39.2", - "eslint-config-eslint": "^13.0.0", + "eslint": "^10.0.3", + "eslint-v9": "npm:eslint@9.x", + "eslint-config-eslint": "^14.0.0", "eslint-plugin-eslint-plugin": "^7.3.2", "globals": "^17.1.0", "knip": "^5.82.1", diff --git a/tests/examples/all.test.js b/tests/examples/all.test.js index 78f251495..bdc4f4112 100644 --- a/tests/examples/all.test.js +++ b/tests/examples/all.test.js @@ -35,12 +35,12 @@ for (const example of examples) { describe("examples", () => { describe(example, () => { it("reports errors on code blocks in .md files", async () => { - const { FlatESLint } = require( - require.resolve("eslint/use-at-your-own-risk", { + const { ESLint } = require( + require.resolve("eslint", { paths: [cwd], }), ); - const eslint = new FlatESLint({ cwd }); + const eslint = new ESLint({ cwd }); const results = await eslint.lintFiles(["README.md"]); const readme = results.find( result => path.basename(result.filePath) == "README.md", diff --git a/tests/plugin.test.js b/tests/plugin.test.js index a49181997..712a9455d 100644 --- a/tests/plugin.test.js +++ b/tests/plugin.test.js @@ -8,15 +8,13 @@ //----------------------------------------------------------------------------- import assert from "node:assert"; -import api from "eslint"; -import unsupportedAPI from "eslint/use-at-your-own-risk"; import path from "node:path"; -import plugin from "../src/index.js"; import fs from "node:fs"; import { fileURLToPath, pathToFileURL } from "node:url"; +import { ESLint } from "eslint"; +import { LegacyESLint } from "eslint-v9/use-at-your-own-risk"; +import plugin from "../src/index.js"; -const ESLint = api.ESLint; -const LegacyESLint = unsupportedAPI.LegacyESLint; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const rulesDir = path.resolve(__dirname, "../src/rules"); @@ -1582,7 +1580,7 @@ describe("FlatESLint", () => { describe("should fix code", () => { before(() => { - eslint = initLegacyESLint("eslintrc.json", { fix: true }); + eslint = initFlatESLint("eslint.config.js", { fix: true }); }); it("in the simplest case", async () => {