platinumazure / eslint-plugin-qunit

ESLint plugin containing rules useful for QUnit tests.
MIT License
30 stars 22 forks source link

ESLint 9 support #499

Closed zloirock closed 1 month ago

zloirock commented 6 months ago
TypeError: context.getScope is not a function
Occurred while linting /***/Documents/GitHub/core-js/tests/helpers/constants.js:1
Rule: "qunit/no-assert-equal"
    at Program (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint-plugin-qunit/lib/rules/no-assert-equal.js:142:62)
    at ruleErrorHandler (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/linter.js:1145:48)
    at /***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at runRules (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/linter.js:1184:40)
    at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/***/Documents/GitHub/core-js/tests/eslint/node_modules/eslint/lib/linter/linter.js:1910:31)
EdPutans commented 5 months ago

Having the same issue in a zustand slice file:


Oops! Something went wrong! :(

  ESLint: 9.0.0

  TypeError: context.getScope is not a function
  Occurred while linting /PATH-TO-FILE-OMITTED/src/beautifulSugar/slices/configSlice.ts:8
  Rule: "import/no-mutable-exports"
      at handleExportNamed (/PATH-TO-FILE-OMITTED/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js:43:29)
      at ruleErrorHandler (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/linter.js:1145:48)
      at /PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/safe-emitter.js:45:58
      at Array.forEach (<anonymous>)
      at Object.emit (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
      at NodeEventGenerator.applySelector (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
      at NodeEventGenerator.applySelectors (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
      at NodeEventGenerator.enterNode (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
      at runRules (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/linter.js:1184:40)
      at Linter._verifyWithoutProcessors (/PATH-TO-FILE-OMITTED/node_modules/eslint/lib/linter/linter.js:1453:31)
zloirock commented 5 months ago

Now this is the last of dozens of eslint plugins that I use that still do not support eslint@9 at all -> block for updating.

LucasHill commented 1 month ago

This should be fixed via https://github.com/platinumazure/eslint-plugin-qunit/pull/532 All tests pass when tested against eslint v9. Would love to get this in and released!