- Added a rule to allow unused variables prefixed with an underscore in ESLint configuration. - Updated destructuring in leveling-form, logging-form, moderation-form, and welcome-form components to prefix unused variables with an underscore, improving clarity and adherence to ESLint rules. - Expanded German and English localization files with new moderation, auto-moderation, logging, welcome, verification, leveling, economy, and fun module settings for better user experience.
36 lines
811 B
JavaScript
36 lines
811 B
JavaScript
import { dirname } from "path";
|
|
import { fileURLToPath } from "url";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
});
|
|
|
|
const eslintConfig = [
|
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
|
{
|
|
ignores: [
|
|
"node_modules/**",
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
],
|
|
},
|
|
{
|
|
rules: {
|
|
// Allow intentionally unused variables (e.g. destructuring to strip fields)
|
|
// when prefixed with an underscore.
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{ varsIgnorePattern: "^_", argsIgnorePattern: "^_" },
|
|
],
|
|
},
|
|
},
|
|
];
|
|
|
|
export default eslintConfig;
|