Skip to content

Flat Config Support #18

@uhyo

Description

@uhyo

We cannot use eslint-plugin-import-access with Flat Config. 😨 This is caused by providing TypeScript Language Server Plugin from the same module.

Config

import typescriptEslintParser from "@typescript-eslint/parser";
import importAccess from 'eslint-plugin-import-access';

export default [
  {
    languageOptions: {
      parser: typescriptEslintParser,
    },
    files: ['**/*.ts'],
    plugins: {
      'import-access': importAccess,
    },
    rules: {
      'import-access/jsdoc': 'error'
    }
  }
]

Error message

ESLint: 9.0.0

ConfigError: Config (unnamed): Key "plugins": Key "import-access": Expected an object.

Workaround

    plugins: {
      'import-access': { ...importAccess },
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions