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

bug report: eslint-plugin-no-autofix:This method cannot be used with flat config. Add your entries directly into the config array #102

Open
AIluffy opened this issue Jan 2, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@AIluffy
Copy link

AIluffy commented Jan 2, 2025

Tell us about your environment

  • **eslint version:9.17.0
  • **eslint-plugin-no-autofix version:2.1.0
  • **eslint config:
import path from "node:path";
import { fileURLToPath } from "node:url";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import autoPlugin from 'eslint-plugin-no-autofix';

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
});

export default [autoPlugin.configs.all];

Expected behavior
success use

Actual behavior
throw error: This method cannot be used with flat config. Add your entries directly into the config array

@AIluffy AIluffy added the bug Something isn't working label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants