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

[BUG] Superplate places some imports in body in App.tsx #242

Open
alexhafner opened this issue Nov 10, 2021 · 1 comment
Open

[BUG] Superplate places some imports in body in App.tsx #242

alexhafner opened this issue Nov 10, 2021 · 1 comment

Comments

@alexhafner
Copy link

Describe the bug
When invoking Superplate with refine-react, auth0 and custom layout app.tsx runs into errors of type "Import in body of module; reorder to top import/first". It's easily enough fixed by reordering the imports to the top, but can be a tad irritating for people trialling the product.

To Reproduce
Steps to reproduce the behavior:

npx superplate-cli refine-tutorial
✔ Cloned remote source successfully.
✔ Select your project type › refine-react
✔ What will be the name of your app · refine-tutorial
✔ Package manager: · yarn
✔ Do you want to customize theme?: · css
✔ Data Provider: · graphql-data-provider
✔ Auth Provider: · auth0-auth-provider
✔ Do you want to customize layout? · custom-layout
✔ i18n - Internationalization: · i18n

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS
  • Browser Edge
  • Version 95.0.1020.44
  • Used dataProvider graphql

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

Detail Errors:

src/App.tsx
  Line 11:1:  Import in body of module; reorder to top  import/first
  Line 12:1:  Import in body of module; reorder to top  import/first
  Line 13:1:  Import in body of module; reorder to top  import/first
  Line 14:1:  Import in body of module; reorder to top  import/first
  Line 22:1:  Import in body of module; reorder to top  import/first

Auto-generated code in App.tsx:

import { Refine, AuthProvider } from "@pankod/refine";
import routerProvider from "@pankod/refine-react-router";

import "@pankod/refine/dist/styles.min.css";
import dataProvider from "@pankod/refine-graphql";
import { GraphQLClient } from "graphql-request";

const API_URL = "https://your-graphql-url/graphql";
const client = new GraphQLClient(API_URL);
const gqlDataProvider = dataProvider(client);
import axios from "axios";
import { useAuth0 } from "@auth0/auth0-react";
import { Login } from "pages/login";
@omeraplak omeraplak transferred this issue from refinedev/refine Nov 10, 2021
@omeraplak
Copy link
Contributor

Hey @alexhafner ,
I moved this issue here because it is related to superplate. We will fix the problem and let you know! Have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants