Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #3739

Closed
2 tasks done
aspizu opened this issue Apr 19, 2024 · 3 comments
Closed
2 tasks done

[Bug]: #3739

aspizu opened this issue Apr 19, 2024 · 3 comments
Labels

Comments

@aspizu
Copy link

aspizu commented Apr 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

[Error - 1:19:43 AM] An unexpected error occurred:
[Error - 1:19:43 AM] TypeError: context.getScope is not a function
Occurred while linting /home/aspizu/Documents/Projects/reproca/example/eslint.config.js:5
Rule: "react/no-string-refs"
    at Object.getParentES6Component (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint-plugin-react/lib/util/componentUtil.js:140:23)
    at isRefsUsage (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint-plugin-react/lib/rules/no-string-refs.js:52:24)
    at MemberExpression (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint-plugin-react/lib/rules/no-string-refs.js:101:13)
    at ruleErrorHandler (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint/lib/linter/linter.js:1145:48)
    at /home/aspizu/Documents/Projects/reproca/example/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/aspizu/Documents/Projects/reproca/example/node_modules/eslint/lib/linter/node-event-generator.js:340:14)

Expected Behavior

import eslint from "@eslint/js"
import reactRecommended from "eslint-plugin-react/configs/recommended.js"
import tseslint from "typescript-eslint"

export default tseslint.config(
    eslint.configs.all,
    ...tseslint.configs.all,
    {
        rules: {
            camelcase: "off",
            "@typescript-eslint/naming-convention": "off",
            "sort-keys": "off",
            "@typescript-eslint/no-unsafe-argument": "off",
            "sort-imports": "off",
            "@typescript-eslint/prefer-enum-initializers": "off",
            "func-style": ["error", "declaration"],
            "one-var": ["error", "never"],
            "@typescript-eslint/no-shadow": "off",
            "no-magic-numbers": "off",
            "@typescript-eslint/no-magic-numbers": "off",
            "@typescript-eslint/prefer-readonly-parameter-types": "off",
            "no-undefined": "off",
            "no-ternary": "off",
            "@typescript-eslint/explicit-function-return-type": "off",
            "no-return-await": "off",
            "@typescript-eslint/return-await": ["error", "always"],
            "no-void": "off"
        },
        languageOptions: {
            parserOptions: {
                EXPERIMENTAL_useProjectService: true
            }
        }
    },
    reactRecommended
)

eslint-plugin-react version

v7.34.1

eslint version

v9.0.0

node version

v10.5.2

@aspizu aspizu added the bug label Apr 19, 2024
@ljharb
Copy link
Member

ljharb commented Apr 20, 2024

This isn't a bug; we're not compatible with eslint 9 yet, and so you simply can't upgrade to it until we are.

Duplicate of #3699.

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2024
@aspizu
Copy link
Author

aspizu commented Apr 20, 2024

how is anyone supposed to know this? atleast put it in the readme.

@ljharb
Copy link
Member

ljharb commented Apr 20, 2024

It’s in the peer deps, and it’s in the npm install output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants