Skip to content

Commit

Permalink
Error when checkout imports anything next.js-specific (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
typeofweb authored Oct 24, 2023
1 parent 46047de commit 96ac6c4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@
"import/no-default-export": "off"
}
},
{
"files": ["src/checkout/**/*.{ts,tsx}"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["next/*", "@next/*", "next"],
"message": "Usage of Next.js-specific imports inside src/checkout is forbidden. Checkout is a standalone component and should not depend on Next.js."
}
]
}
]
}
},
{
"files": ["__tests__/**/*.{ts,tsx}"],
"extends": ["plugin:playwright/recommended"]
Expand Down

0 comments on commit 96ac6c4

Please sign in to comment.