Skip to content

Failed to load eslint.config.js when shareable config uses @rushstack/eslint-patch #70

Open
@r34son

Description

@r34son
image

eslint.config.mjs:

import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { fixupConfigRules, includeIgnoreFile } from '@eslint/compat';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
  baseDirectory: __dirname,
  recommendedConfig: js.configs.recommended,
  allConfig: js.configs.all,
});
const gitignorePath = path.resolve(__dirname, '.gitignore');

/** @type { import("eslint").Linter.FlatConfig[] } */
export default [
  includeIgnoreFile(gitignorePath),
  ...fixupConfigRules(
    compat.extends('next/core-web-vitals'),
  ),
];
Full error
Failed to load eslint.config.js
Error: Cannot read config file: /Users/seitasanov/ownProjects/profile/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/eslint-config-next/index.js
Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
Referenced from: /Users/seitasanov/ownProjects/profile/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/eslint-config-next/core-web-vitals.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions