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:
@@ -10,9 +10,10 @@ In your `medusa-config.js` , you should ensure that you've configured your CORS
|
||||
|
||||
The default configuration uses the following CORS settings:
|
||||
|
||||
```jsx title=medusa-config.js
|
||||
```js title=medusa-config.js
|
||||
// CORS when consuming Medusa from admin
|
||||
const ADMIN_CORS = process.env.ADMIN_CORS || "http://localhost:7000,http://localhost:7001"
|
||||
const ADMIN_CORS = process.env.ADMIN_CORS ||
|
||||
"http://localhost:7000,http://localhost:7001"
|
||||
|
||||
// CORS to avoid issues when consuming Medusa from a client
|
||||
const STORE_CORS = process.env.STORE_CORS || "http://localhost:8000"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
You add payment providers to your Medusa instance by adding them as plugins in `medusa-config.js`:
|
||||
|
||||
```jsx title=medusa-config.js
|
||||
```js title=medusa-config.js
|
||||
const plugins = [
|
||||
...
|
||||
// ...
|
||||
// You can create a Stripe account via: https://stripe.com
|
||||
{
|
||||
resolve: `medusa-payment-stripe`,
|
||||
@@ -13,8 +13,7 @@ const plugins = [
|
||||
webhook_secret: STRIPE_WEBHOOK_SECRET,
|
||||
},
|
||||
},
|
||||
...
|
||||
];
|
||||
]
|
||||
```
|
||||
|
||||
And installing them with your favourite package manager:
|
||||
|
||||
@@ -11,7 +11,7 @@ After installing it, make sure to configure your Medusa server to use Redis:
|
||||
```jsx title=medusa-config.js
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
//...
|
||||
// ...
|
||||
redis_url: REDIS_URL,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ Then in your `medusa-config.js`, you should change the project configuration to
|
||||
```jsx title=medusa-config.js
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
//...
|
||||
// ...
|
||||
database_url: DATABASE_URL,
|
||||
database_type: "postgres",
|
||||
},
|
||||
@@ -31,6 +31,8 @@ Where `DATABASE_URL` is the connection string to your PostgreSQL database. You c
|
||||
|
||||
Make sure to also remove the following lines that are used to configure an SQLite database:
|
||||
|
||||
<!-- eslint-skip -->
|
||||
|
||||
```jsx title=medusa-config.js
|
||||
database_type: "sqlite",
|
||||
database_database: "./medusa-db.sql",
|
||||
|
||||
Reference in New Issue
Block a user