chore(docs): added eslint to lint documentation code blocks (#2920)
* docs: added rule for code length * chore: fixes based on vale errors * changed to use eslint * fixes using eslint * added github action for documentation eslint * changed allowed max-length * fixed incorrect heading level * removed comment
This commit is contained in:
1 parent
99add15fc3
commit
d1b4b11ff6
67 files changed
+2611
-1735
No files matched your search
@@ -126,7 +126,9 @@ Where `amount` is the amount of the variant’s price in the price list, `taxRat
|
||||
|
||||
Here is an example of these fields when tax inclusivity is enabled for both the currency and the price list:
|
||||
|
||||
```jsx noReport
|
||||
<!-- eslint-skip -->
|
||||
|
||||
```js noReport
|
||||
{
|
||||
original_price: 110,
|
||||
calculated_price: 100,
|
||||
|
||||
@@ -29,7 +29,7 @@ You can, however, force calculating the taxes of the cart by passing in the thir
|
||||
For example:
|
||||
|
||||
```jsx
|
||||
cartService.retrieve('cart_01G8Z...', { }, { force_taxes: true });
|
||||
cartService.retrieve("cart_01G8Z...", { }, { force_taxes: true })
|
||||
```
|
||||
|
||||
:::tip
|
||||
@@ -45,20 +45,20 @@ Another way you can use the `CartService` to calculate taxes is using the method
|
||||
```jsx
|
||||
|
||||
export default () => {
|
||||
//...
|
||||
// ...
|
||||
|
||||
router.get("/store/line-taxes", async (req, res) => {
|
||||
//example of retrieving cart
|
||||
const cartService = req.scope.resolve("cartService");
|
||||
// example of retrieving cart
|
||||
const cartService = req.scope.resolve("cartService")
|
||||
const cart = await cartService.retrieve(cart_id)
|
||||
|
||||
//...
|
||||
//retrieve taxes of line items
|
||||
// ...
|
||||
// retrieve taxes of line items
|
||||
const data = await decorateTotals(cart, {
|
||||
force_taxes: true
|
||||
force_taxes: true,
|
||||
})
|
||||
|
||||
return res.status(200).json({ cart: data });
|
||||
return res.status(200).json({ cart: data })
|
||||
})
|
||||
}
|
||||
```
|
||||
@@ -72,7 +72,7 @@ You can calculate and retrieve taxes of line items using the `getLineItemTotals`
|
||||
```jsx
|
||||
const itemTotals = await totalsService
|
||||
.getLineItemTotals(item, cart, {
|
||||
include_tax: true
|
||||
include_tax: true,
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user