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

Unable to resolve path to module 'typescript-eslint'.eslintimport/no-unresolved | Not working with ESLINT 9> FlatConfig and typescript-eslint #3154

Open
gabriel-logan opened this issue Feb 5, 2025 · 0 comments

Comments

@gabriel-logan
Copy link

Unable to resolve path to module 'typescript-eslint'.eslintimport/no-unresolved

Unsafe argument of type error typed assigned to a parameter of type InfiniteDepthConfigWithExtends.eslint@typescript-eslint/no-unsafe-argument

Unsafe member access .flatConfigs on an error typed value.eslint@typescript-eslint/no-unsafe-member-access

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import importPlugin from "eslint-plugin-import";

export default tseslint.config(
  eslint.configs.recommended,
  importPlugin.flatConfigs.recommended,
  tseslint.configs.strictTypeChecked,
  eslintPluginPrettierRecommended,
  {
    languageOptions: {
      parserOptions: {
        project: "tsconfig.eslint.json",
        tsconfigRootDir: ".",
      },
    },
    ignores: [
      "webpack.config.js",
      "dist/",
      "tests/generateFakeImage.js",
      "types/",
      "internalTests/",
    ],
    rules: {
      "no-else-return": ["error", { allowElseIf: false }],
      "consistent-return": "error",
      "no-console": "warn",
      "@typescript-eslint/typedef": [
        "error",
        {
          variableDeclaration: true,
          memberVariableDeclaration: true,
        },
      ],
      "@typescript-eslint/prefer-readonly": "error",
      "@typescript-eslint/explicit-function-return-type": "error",
      "@typescript-eslint/explicit-member-accessibility": [
        "error",
        {
          accessibility: "explicit",
          overrides: {
            accessors: "explicit",
            constructors: "no-public",
            methods: "explicit",
            properties: "explicit",
            parameterProperties: "explicit",
          },
        },
      ],
      "@typescript-eslint/consistent-type-imports": "error",
      "@typescript-eslint/consistent-type-exports": "error",
    },
  },
);
	"devDependencies": {
		"@eslint/js": "^9.19.0",
		"@types/jest": "^29.5.14",
		"@types/node": "^22.13.1",
		"@typescript-eslint/parser": "^8.23.0",
		"eslint": "^9.19.0",
		"eslint-config-prettier": "^10.0.1",
		"eslint-import-resolver-typescript": "^3.7.0",
		"eslint-plugin-import": "^2.31.0",
		"eslint-plugin-prettier": "^5.2.3",
		"jest": "^29.7.0",
		"prettier": "^3.4.2",
		"ts-jest": "^29.2.5",
		"ts-loader": "^9.5.2",
		"ts-node": "^10.9.2",
		"typescript": "^5.7.3",
		"typescript-eslint": "^8.23.0",
		"webpack": "^5.97.1",
		"webpack-cli": "^6.0.1"
	},

I always used it with ESLINT 8< and it always worked ok, I tested it with eslint 9 now and it's giving these errors, besides not applying the rules.

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

No branches or pull requests

1 participant