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

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

Open
r34son opened this issue Jun 21, 2024 · 0 comments

Comments

@r34son
Copy link

r34son commented Jun 21, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant