Skip to content

Commit

Permalink
chore: fix linting errors & eslint config in core module
Browse files Browse the repository at this point in the history
  • Loading branch information
bmstefanski committed Jan 28, 2024
1 parent 83c6523 commit 9894579
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 11 deletions.
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.next
node_modules
gql
gql

dist
/dist
dist/*
dist/**/*
2 changes: 1 addition & 1 deletion apps/web/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function NotFound() {
<h1 className="text-6xl font-bold text-gray-800 dark:text-gray-200">404</h1>
<p className="mt-4 text-2xl text-gray-600 dark:text-gray-400">Page not found</p>
<p className="mt-2 text-lg text-gray-500 dark:text-gray-300">
Sorry, we couldn't find the page you're looking for.
Sorry, we couldn&apos;t find the page you&apos;re looking for.
</p>
<Link
className="mt-8 rounded-md bg-gray-200 px-6 py-2 text-gray-900 hover:bg-gray-300 hover:text-gray-900 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-gray-200"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "cross-env FORCE_COLOR=1 next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint": "cross-env FORCE_COLOR=1 next lint",
"lint:fix": "next lint --fix",
"prettier": "prettier --check \"**/*.{js,jsx,ts,tsx}\"",
"prettier:fix": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/views/Product/ProductView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* This code was generated by v0 by Vercel.
* @see https://v0.dev/t/J1swfBP3ZeH
*/
import { Label } from "components/ui/Label"
import { RadioGroupItem, RadioGroup } from "components/ui/RadioGroup"
import { SelectValue, SelectTrigger, SelectItem, SelectContent, Select } from "components/ui/Select"
import { Button } from "components/ui/Button"
import { storefrontClient } from "utils/storefrontClient"
import { Label } from "components/ui/Label"
import { RadioGroup, RadioGroupItem } from "components/ui/RadioGroup"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "components/ui/Select"
import { notFound } from "next/navigation"
import { storefrontClient } from "utils/storefrontClient"

export async function ProductView({ slug }) {
const queriedProducts = await storefrontClient.getProductsByHandle(slug)
Expand Down
8 changes: 8 additions & 0 deletions packages/core/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.next
node_modules
gql

dist
/dist
dist/*
dist/**/*
3 changes: 3 additions & 0 deletions packages/core/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ["@enterprise-commerce/eslint-config-custom/base"],
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"prebuild": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"build": "cross-env FORCE_COLOR=1 tsup **/*.ts --format esm,cjs --dts --external react",
"dev": "cross-env FORCE_COLOR=1 tsup **/*.ts --format esm,cjs --watch --dts --external react --onSuccess 'node dist/index.mjs about'",
"lint": "eslint .",
"lint": "cross-env FORCE_COLOR=1 eslint .",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"test": "cross-env FORCE_COLOR=1 jest --passWithNoTests"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/core/platform/shopify/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { StorefrontApiClient, createStorefrontApiClient } from "@shopify/storefront-api-client"
import { createStorefrontApiClient, StorefrontApiClient } from "@shopify/storefront-api-client"
import nodeFetch from "node-fetch"

import { getMenuQuery } from "./queries/menu"
import { getProductsByHandleQuery, getProductQuery } from "./queries/product"
import { getProductQuery, getProductsByHandleQuery } from "./queries/product"

import { MenuQuery, ProductsByHandleQuery, ProductsQuery } from "../../../../types/storefront.generated"

Expand All @@ -16,7 +16,7 @@ export function createShopifyClient({ accessToken, storeDomain }: CreateShopifyC
storeDomain,
privateAccessToken: accessToken,
apiVersion: "2024-01",
customFetchApi: (url, init) => nodeFetch(url, init) as never,
customFetchApi: (url, init) => nodeFetch(url, init as never) as never,
})

return {
Expand Down

0 comments on commit 9894579

Please sign in to comment.