eslint / config-inspector

A visual tool for inspecting and understanding your ESLint flat configs.
https://www.npmjs.com/package/@eslint/config-inspector
Apache License 2.0
518 stars 15 forks source link

Error during load 'eslint.config.js' #48

Closed Yehor-Kapranov-GL closed 2 months ago

Yehor-Kapranov-GL commented 2 months ago

When I trying to run npx @eslint/config-inspector I get an error: Error: Dynamic require of "fs" is not supported Env: Node.js 20 Config

import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';

export default [
  { languageOptions: { globals: globals.node } },
  pluginJs.configs.recommended,
  ...tseslint.configs.recommended,
  {
    files: ['__tests__/**/*'],
    plugins: ['jest'],
    env: {
      'jest/globals': true,
    },
  },
  {
    rules: {
      'prefer-const': 'error',
      'max-len': ['error', { code: 120, ignoreComments: true }],
    },
    files: ['**/*.ts'],
  },
];
antfu commented 2 months ago

I suppose plugins: ['jest'] isn't even valid in flat config

antfu commented 2 months ago

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required