Files
ProxmoxVE-Local/eslint.config.js
CanbiZ ec23600861 Switch ESLint config to eslint-config-next/core-web-vitals
Replaces @eslint/eslintrc and FlatCompat with eslint-config-next/core-web-vitals for ESLint configuration. Updates linting scripts in package.json to use eslint directly instead of next lint. Removes @eslint/eslintrc from devDependencies.
2025-11-28 12:20:53 +01:00

53 lines
1.6 KiB
JavaScript

import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [".next"],
},
...compat.extends("next/core-web-vitals"),
{
files: ["**/*.ts", "**/*.tsx"],
extends: [
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
],
rules: {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{ prefer: "type-imports", fixStyle: "inline-type-imports" },
],
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{ checksVoidReturn: { attributes: false } },
],
// Disable problematic rules that are causing issues with Node.js APIs and WebSocket libraries
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/consistent-generic-constructors": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
},
},
{
linterOptions: {
reportUnusedDisableDirectives: true,
},
languageOptions: {
parserOptions: {
projectService: true,
},
},
},
);