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

ui/eslintrc: Turn off "import/prefer-default-export" #925

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion clients/admin-ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"^draft"
]
}
]
],
// Default exports are slightly preferred for component files, but this rule has too many false positives.
"import/prefer-default-export": "off"
}
}
1 change: 0 additions & 1 deletion clients/admin-ui/src/features/organization/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const DEFAULT_ORGANIZATION_FIDES_KEY = "default_organization";
1 change: 0 additions & 1 deletion clients/admin-ui/src/features/taxonomy/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { DataCategory } from "~/types/api";

import { DataCategoryNode } from "./types";

// eslint-disable-next-line import/prefer-default-export
export const transformDataCategoriesToNodes = (
categories: DataCategory[],
parentKey?: string
Expand Down
1 change: 0 additions & 1 deletion clients/admin-ui/src/mocks/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ import { setupWorker } from "msw";

import { handlers } from "./handlers";

// eslint-disable-next-line import/prefer-default-export
export const worker = setupWorker(...handlers);
1 change: 0 additions & 1 deletion clients/admin-ui/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const mockSubjectRequestPreviewResponse = {
],
};

// eslint-disable-next-line import/prefer-default-export
export const handlers = [
rest.get<SubjectRequestBody>(
"http://localhost:8080/api/v1/privacy-request",
Expand Down
1 change: 0 additions & 1 deletion clients/admin-ui/src/mocks/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ import { setupServer } from "msw/node";

import { handlers } from "./handlers";

// eslint-disable-next-line import/prefer-default-export
export const server = setupServer(...handlers);
2 changes: 0 additions & 2 deletions clients/admin-ui/src/test-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ const useRouter = jest.spyOn(require("next/router"), "useRouter");
* Mocks the useRouter React hook from Next.js on a test-case by test-case basis
* Adapted from https://github.com/vercel/next.js/issues/7479#issuecomment-587145429
*/
// we will probably have more than just this in this utils file, so keep it as a non-default export for now
// eslint-disable-next-line import/prefer-default-export
export function mockNextUseRouter({
route = "/",
pathname = "/",
Expand Down