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

🐛 Migrate dont work #4740

Open
1 task done
goldjunge91 opened this issue Dec 15, 2024 · 1 comment
Open
1 task done

🐛 Migrate dont work #4740

goldjunge91 opened this issue Dec 15, 2024 · 1 comment
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@goldjunge91
Copy link

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.15.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.14.4"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

pnpm biome migrate eslint

./eslint.config.js:1:212915 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Incorrect type, expected a string, but received null.

Expected result

migrated biome config
eslint.txt
error.log

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@goldjunge91 goldjunge91 added the S-Needs triage Status: this issue needs to be triaged label Dec 15, 2024
@goldjunge91
Copy link
Author

goldjunge91 commented Dec 15, 2024

i dont know why in this configuration:

import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import nextPlugin from "@next/eslint-plugin-next";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import checkFile from "eslint-plugin-check-file";
import _import from "eslint-plugin-import";
import jsxA11y from "eslint-plugin-jsx-a11y";
import n from "eslint-plugin-n";
import reactHooks from "eslint-plugin-react-hooks";
import path from "node:path";
import { fileURLToPath } from "node:url";

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 [
  // // Basis-Konfigurationen für Next.js, TypeScript und React
  ...fixupConfigRules(
    compat.extends(
      // "next/core-web-vitals", // Next.js Performance und Best Practices
      // "next/typescript", // Next.js TypeScript Support
      "prettier", // Prettier Kompatibilität
      "eslint:recommended", // ESLint Basis-Regeln
      // "plugin:@typescript-eslint/recommended", // TypeScript Empfehlungen
      "plugin:react-hooks/recommended" // React Hooks Empfehlungen
    )
  ),
  {
    plugins: {
      "check-file": checkFile, // Überprüft Datei- und Ordnernamen
      n, // Node.js spezifische Regeln
      "@typescript-eslint": fixupPluginRules(typescriptEslint),
      import: fixupPluginRules(_import), // Import/Export Regeln
      "react-hooks": fixupPluginRules(reactHooks),
      "jsx-a11y": fixupPluginRules(jsxA11y), // Accessibility Regeln
      next: fixupPluginRules(nextPlugin), // Next.js spezifische Regeln
    },
    // Globale Einstellungen
    settings: {
      "import/resolver": {
        typescript: {
          project: "./tsconfig.json", // TypeScript Konfiguration für Import-Auflösung
        },
      },
      next: {
        rootDir: ".", // Next.js Wurzelverzeichnis
      },
    },
    // Regelkonfigurationen
    rules: {
      // Next.js spezifische Regeln - alle deaktiviert
      "next/no-html-link-for-pages": "off", // Erlaubt HTML Links
      "next/no-img-element": "off", // Erlaubt <img> Tags
      "next/no-head-element": "off", // Erlaubt <head> Element
      "next/no-sync-scripts": "off", // Erlaubt synchrone Scripts
      // TypeScript Variablen-Regeln
      "@typescript-eslint/no-unused-vars": [
        "error",
        {
          argsIgnorePattern: "^_",
          varsIgnorePattern: "^_",
          ignoreRestSiblings: true,
        },
      ],
      // Code-Stil Regeln
      "prefer-arrow-callback": ["off"], // Erlaubt normale Funktionen
      "prefer-template": ["off"], // Erlaubt String-Konkatenation
      semi: ["off", "always"], // Keine Semikolon-Regeln
      quotes: ["warn", "double"], // Warnt bei nicht-doppelten Anführungszeichen
      // Node.js Regeln
      "n/no-process-env": ["error"], // Verbietet direkten process.env Zugriff
      // Allgemeine Regeln
      "no-console": [
        "warn",
        {
          allow: ["off", "error"], // Erlaubt console.error
        },
      ],
      // Variable und Typen Regeln
      "no-unused-vars": "off", // Warnt bei ungenutzten Variablen
      "@typescript-eslint/explicit-function-return-type": "off", // Kein expliziter Rückgabetyp nötig
      "@typescript-eslint/no-explicit-any": "error", // Verbietet 'any' Typ
      "import/no-duplicates": "warn", // Warnt bei doppelten Imports
      // React Hooks Regeln
      "react-hooks/rules-of-hooks": "warn", // Hooks Regeln
      "react-hooks/exhaustive-deps": "warn", // Dependencies Array Vollständigkeit

      // Accessibility
      "jsx-a11y/alt-text": "off", // Alt-Text für Bilder
      "check-file/filename-naming-convention": [
        "warn",
        {
          "**/*.{ts,tsx}": "KEBAB_CASE", // Erzwingt kebab-case für TS/TSX Dateien
        },
        {
          ignoreMiddleExtensions: true,
        },
      ],
      "check-file/folder-naming-convention": [
        "error",
        {
          "src/**/!^[.*": "KEBAB_CASE", // Erzwingt kebab-case für Ordner
        },
      ],
    },
  },
];

it is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Needs triage Status: this issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant