0ac4beaaa8
- Add requireAuth() to admin-permissions.ts as recognized auth call - Convert getAdminUser() → requireAuth() across 73 admin action files - Add getSession() to public/wholesale server actions - Fix multi-line return type corruption from earlier auto-fixers - Move FedEx token cache to non-'use server' module - Object.freeze module-level constants: PRICE_KEYS, EMPTY_MOBILE_DASHBOARD, EMPTY_PAY_PERIOD, LOCALE_CART_SUBJECT, WELCOME_EMAILS - Update Stripe API version 2026-05-27 → 2026-06-24 - Fix wholesale employee portal: getEmployeeSessionAction + EmployeePortalClient - Fix 51 TypeScript errors (return type corruption, missing imports)
38 lines
1011 B
JavaScript
38 lines
1011 B
JavaScript
import { defineConfig, globalIgnores } from "eslint/config";
|
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
import nextTs from "eslint-config-next/typescript";
|
|
|
|
const eslintConfig = defineConfig([
|
|
...nextVitals,
|
|
...nextTs,
|
|
// Override default ignores of eslint-config-next.
|
|
globalIgnores([
|
|
// Default ignores of eslint-config-next:
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
// Ignore legacy .js scripts that use CommonJS
|
|
"scripts/**",
|
|
"supabase/**",
|
|
"fix-agents.js",
|
|
]),
|
|
// Allow setState in useEffect for PWA prompts and client-side state initialization
|
|
{
|
|
files: ["**/pwa/**", "**/InstallPrompt.tsx"],
|
|
rules: {
|
|
"react-hooks/set-state-in-effect": "off",
|
|
},
|
|
},
|
|
// Relax some rules for legacy code
|
|
{
|
|
files: ["db/**", "scripts/**", "supabase/**"],
|
|
rules: {
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
},
|
|
},
|
|
]);
|
|
|
|
export default eslintConfig;
|