{"schemaVersion":1,"name":"@cimplify/sdk/starter","rules":[{"id":"sdk/check-result-ok","severity":"error","message":"Check `result.ok` before reading `result.value`.","help":"Cimplify SDK calls return Result values. Handle the error branch before using the value.","primitive":{"kind":"required-result-check","factories":[{"source":"@cimplify/sdk","imported":["createCimplifyClient"]},{"source":"@cimplify/sdk/server","imported":["getServerClient"]}],"guardProperty":"ok","valueProperty":"value"}},{"id":"sdk/render-price-component","severity":"error","message":"Render money with the SDK `Price` component.","help":"`Price` applies the active business currency and locale consistently.","primitive":{"kind":"required-wrapper-call","context":"jsx-child","activationImports":[{"value":"@cimplify/sdk","match":"prefix"}],"subjectNamePattern":"(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$","wrapper":{"syntax":"jsx","source":"@cimplify/sdk/react","imported":"Price","prop":"amount"}},"fix":{"kind":"wrap-jsx-expression"}},{"id":"sdk/parse-price-before-math","severity":"error","message":"Call `parsePrice` before using a money value in numeric operations.","help":"Money arrives over the wire as a decimal string; implicit coercion can produce incorrect comparisons and totals.","primitive":{"kind":"required-wrapper-call","context":"numeric-operation","activationImports":[{"value":"@cimplify/sdk","match":"prefix"}],"subjectNamePattern":"(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$","wrapper":{"syntax":"call","imports":[{"source":"@cimplify/sdk","imported":["parsePrice"]},{"source":"@cimplify/sdk/utils","imported":["parsePrice"]}]},"operators":["+","-","*","/","%","**","<","<=",">",">="]}},{"id":"sdk/no-react-query","severity":"error","message":"Use Cimplify SDK hooks instead of React Query.","help":"Use the SDK hooks and their provider-owned cache so cart, catalogue, and account state stay coherent.","primitive":{"kind":"banned-import","sources":[{"value":"react-query","match":"exact"},{"value":"@tanstack/react-query","match":"prefix"}]}},{"id":"sdk/no-cookie-in-cache-key","severity":"error","message":"Remove the Cookie header from this cacheable request.","help":"Cookie-bearing requests bypass the shared cache by design. Keep personalized cart/account reads in a client island.","primitive":{"kind":"banned-call-argument","callees":["fetch","Request"],"globalCalleesOnly":true,"argumentIndexes":[1],"objectPaths":[["headers","cookie"]],"caseInsensitive":true},"fix":{"kind":"remove-object-property"}},{"id":"ui/no-raw-img","severity":"warning","message":"Use `next/image` instead of a raw `<img>` element.","help":"The storefront image loader supplies responsive sizes, modern formats, and intrinsic dimensions.","primitive":{"kind":"banned-jsx-element","elements":["img"]}},{"id":"ui/theme-tokens-only","severity":"warning","message":"Use storefront theme tokens instead of hard-coded color utilities.","help":"Define palette changes in `app/globals.css` and consume semantic utilities such as `bg-background` and `text-foreground`.","primitive":{"kind":"banned-classname-pattern","patterns":["^(?:accent|bg|border|caret|decoration|divide|fill|from|outline|placeholder|ring|shadow|stroke|text|to|via)-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950)$","^(?:accent|bg|border|caret|decoration|divide|fill|from|outline|placeholder|ring|shadow|stroke|text|to|via)-(?:black|white)$","^(?:accent|bg|border|caret|decoration|divide|fill|from|outline|placeholder|ring|shadow|stroke|text|to|via)-\\[(?:#|rgba?\\(|hsla?\\(|oklch\\(|oklab\\(|lab\\(|lch\\(|color:)"],"replacements":[{"from":"bg-white","to":"bg-background"},{"from":"bg-black","to":"bg-foreground"},{"from":"text-black","to":"text-foreground"},{"from":"border-black","to":"border-foreground"},{"from":"border-white","to":"border-background"}]},"fix":{"kind":"replace-classname"}}]}
