import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESLint: Parse errors in imported module 'foo': parserPath or languageOptions.parser is required! (undefined:undefined)(import/namespace)

enablonian opened this issue · comments

I am using flat config with the following:

import jslint from "@eslint/js"
import pluginImport from "eslint-plugin-import"
import globals from "globals"
import tslint from "typescript-eslint"

export default [
  {
    languageOptions: {
      globals: globals.node,
      ecmaVersion: "latest",
      sourceType: "module"
    }
  },
  jslint.configs.recommended,
  ...tslint.configs.recommended,
  {
    files: ["**/*.@(js|ts|tsx)"],
    plugins: {
      "import": pluginImport,
    },
    rules: {
      ...pluginImport.configs.recommended.rules,
      ...pluginImport.configs.typescript.rules,
    }
  },
  recommendedPrettier
]

This produces the following error:

ESLint: Parse errors in imported module 'typescript-eslint': parserPath or languageOptions.parser is required! (undefined:undefined)(import/namespace)

This plugin does not yet support flat config. See #2873