fix(lint): resolve all 24 ESLint errors across web, api and e2e
- Remove unused imports (waitFor, useAuthStore) in dashboard test files - Convert import() type annotation to import type in comparison-store spec - Add next-env.d.ts to ESLint ignores (auto-generated file) - Fix empty object pattern in auth.fixture.ts - Sort import order alphabetically in 5 API test files Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable import-x/order */
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
vi.mock('next/dynamic', () => ({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable import-x/order */
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
vi.mock('next/dynamic', () => ({
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
|
||||
vi.mock('@/lib/auth-store', () => {
|
||||
const store = {
|
||||
user: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable import-x/order */
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
const mockTransactions = {
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
|
||||
vi.mock('@/lib/auth-store', () => {
|
||||
const store = {
|
||||
user: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable import-x/order */
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
const mockPlans = [
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import type { ListingDetail } from '../listings-api';
|
||||
|
||||
// Provide a minimal localStorage mock before importing the store module
|
||||
// (Zustand persist needs getItem/setItem)
|
||||
@@ -17,7 +18,6 @@ vi.stubGlobal('localStorage', {
|
||||
|
||||
// Now import after mocks are in place
|
||||
const { useComparisonStore, computeComparisonStats, MAX_COMPARE, MIN_COMPARE } = await import('../comparison-store');
|
||||
type ListingDetail = import('../listings-api').ListingDetail;
|
||||
|
||||
// Reset Zustand store between tests
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user