Skip to content

Commit 6f48990

Browse files
committed
Lint Markdown
1 parent 78b7082 commit 6f48990

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+826
-555
lines changed

.github/workflows/cd.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches:
66
- main
77
- '*.*'
8-
- ci/github-actions
98

109
jobs:
1110
deploy:

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
uses: github/super-linter@v3
2020
env:
2121
VALIDATE_ALL_CODEBASE: false
22-
DEFAULT_BRANCH: main
22+
VALIDATE_EDITORCONFIG: false
23+
VALIDATE_JSCPD: false
24+
DEFAULT_BRANCH: 2.6
2325
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2426

2527
- uses: actions/cache@v2

.markdownlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
line_length: false
2+
no-inline-html:
3+
allowed_elements: [a, p, img, br]

admin/components.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ const App = () => (
3030
export default App;
3131
```
3232

33-
**Props**
33+
#### Props
34+
3435
| Name | Type | Value | required | Description |
3536
|-------------------|--------------------|----------------|----------|----------------------------------------------------------------------------------|
3637
| dataProvider | object or function | - | yes | communicates with your API |
@@ -66,7 +67,8 @@ const App = () => (
6667
export default App;
6768
```
6869

69-
**Props**
70+
#### ResourceGuesser Props
71+
7072
| Name | Type | Value | required | Description |
7173
|------|--------|-------|----------|--------------------------|
7274
| name | string | - | yes | endpoint of the resource |
@@ -96,14 +98,15 @@ export const BooksList = props => (
9698
</ListGuesser>
9799
);
98100
```
99-
**Props**
101+
102+
#### ListGuesser Props
103+
100104
| Name | Type | Value | required | Description |
101105
|----------|------------------|-------|----------|-----------------------------------------|
102106
| children | node or function | - | no | - |
103107
| resource | string | - | yes | endpoint of the resource |
104108
| filters | element | - | no | filters that can be applied to the list |
105109

106-
107110
You can also use props accepted by React-Admin's [`<List>`](https://marmelab.com/react-admin/List.html).
108111

109112
### CreateGuesser
@@ -126,7 +129,8 @@ export const BooksCreate = props => (
126129
);
127130
```
128131

129-
**Props**
132+
#### CreateGuesser Props
133+
130134
| Name | Type | Value | required | Description |
131135
| Name | Type | Value | required | Description |
132136
|----------|------------------|-------|----------|--------------------------|
@@ -155,7 +159,8 @@ export const BooksEdit = props => (
155159
);
156160
```
157161

158-
**Props**
162+
#### EditGuesser Props
163+
159164
| Name | Type | Value | required | Description |
160165
|----------|------------------|-------|----------|--------------------------|
161166
| children | node or function | - | no | - |
@@ -182,7 +187,8 @@ export const BooksShow = props => (
182187
);
183188
```
184189

185-
**Props**
190+
#### ShowGuesser Props
191+
186192
| Name | Type | Value | required | Description |
187193
|----------|------------------|-------|----------|--------------------------|
188194
| children | node or function | - | no | - |
@@ -214,7 +220,8 @@ const App = () => (
214220
export default App;
215221
```
216222

217-
**Props**
223+
#### HydraAdmin Props
224+
218225
| Name | Type | Value | required | Description |
219226
|------------|--------|-------|----------|-----------------------|
220227
| entrypoint | string | - | yes | entrypoint of the API |
@@ -252,7 +259,9 @@ export const BooksShow = props => (
252259
</ShowGuesser>
253260
)
254261
```
255-
**Props**
262+
263+
#### FieldGuesser Props
264+
256265
| Name | Type | Value | required | Description |
257266
|--------|--------|-------|----------|--------------------------|
258267
| source | string | - | yes | endpoint of the resource |
@@ -263,7 +272,8 @@ You can also use props accepted by React-Admin's [`Basic Fields`](https://marmel
263272

264273
Uses React-Admin's [`<ReferenceInput>`](https://marmelab.com/react-admin/Inputs.html#referenceinput) to generate inputs according to your API documentation (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
265274

266-
**Props**
275+
#### InputGuesser Props
276+
267277
| Name | Type | Value | required | Description |
268278
|--------|--------|-------|----------|--------------------------|
269279
| source | string | - | yes | endpoint of the resource |

admin/customizing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ For instance, using an autocomplete input is straightforward, [checkout the dedi
185185
API Platform is built on top of [React Admin](https://marmelab.com/react-admin/).
186186
You can use all the features provided by the underlying library with API Platform Admin, including support for [file upload](https://marmelab.com/react-admin/DataProviders.html#decorating-your-data-provider-example-of-file-upload), [authentication](https://marmelab.com/react-admin/Authentication.html), [authorization](https://marmelab.com/react-admin/Authorization.html) and deeper customization.
187187

188-
To learn more about these capabilities, refer to [the React Admin documentation](https://marmelab.com/react-admin/).
188+
To learn more about these capabilities, refer to [the React Admin documentation](https://marmelab.com/react-admin/).

admin/getting-started.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ Otherwise, all you need to install API Platform Admin is a JavaScript package ma
88

99
If you don't have an existing React Application, create one using [Create React App](https://create-react-app.dev/):
1010

11-
$ yarn create react-app my-admin
11+
```console
12+
yarn create react-app my-admin
13+
```
1214

1315
Go to the directory of your project:
1416

15-
$ cd my-admin
17+
```console
18+
cd my-admin
19+
```
1620

1721
Finally, install the `@api-platform/admin` library:
1822

19-
$ yarn add @api-platform/admin
23+
```console
24+
yarn add @api-platform/admin
25+
```
2026

2127
## Creating the Admin
2228

@@ -59,7 +65,10 @@ nelmio_cors:
5965
6066
Clear the cache to apply this change:
6167
62-
$ docker-compose exec php bin/console cache:clear --env=prod
68+
```console
69+
docker-compose exec php \
70+
bin/console cache:clear --env=prod
71+
```
6372

6473
Your new administration interface is ready! Type `yarn start` to try it!
6574

admin/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ API Platform Admin is a tool to automatically create a beautiful and fully featu
66
for any API supporting [the Hydra Core Vocabulary](http://www.hydra-cg.com/) or other API specification formats supported by [`@api-platform/api-doc-parser`](https://github.com/api-platform/api-doc-parser) (experimental support for [OpenAPI](https://www.openapis.org/) is also available).
77

88
API Platform Admin is the perfect companion of APIs created
9-
using [the API Platform framework](https://api-platform.com), but also supports APIs written with any other programming language or framework as long as they expose a standard Hydra API documentation.
9+
using [the API Platform framework](https://api-platform.com), but also supports APIs written with any other programming language or framework as long as they expose a standard Hydra API documentation.
1010

1111
API Platform Admin is a 100% standalone Single-Page-Application with no coupling to the server part,
1212
according to the API-first paradigm.
@@ -21,7 +21,7 @@ You can **customize everything** by using provided React Admin and [Material UI
2121
* Automatically generates an admin interface for all the resources of the API thanks to hypermedia features of Hydra
2222
* Generates 'list', 'create', 'show', and 'edit' screens, as well as a delete button
2323
* Generates suitable inputs and fields according to the API doc (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
24-
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for http://schema.org/email)
24+
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for `http://schema.org/email`)
2525
* Handles relationships
2626
* Supports pagination
2727
* Supports filters and ordering

client-generator/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Client Generator is the fastest way to scaffold fully featured webapps and nativ
44

55
![Screencast](images/client-generator-demo.gif)
66

7-
*Generated React and React Native apps, updated in real time*
7+
## Generated React and React Native Apps, Updated in Real Time
88

99
It is able to generate apps using the following frontend stacks:
1010

client-generator/nextjs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Create a [Next.js application with express server](https://github.com/zeit/next.
1818

1919
Enable TypeScript in your next project
2020

21-
$ yarn add --dev typescript @types/react @types/node
21+
yarn add --dev typescript @types/react @types/node
2222

2323
Install required dependencies:
2424

25-
$ yarn add lodash.get lodash.has @types/lodash isomorphic-unfetch formik
25+
yarn add lodash.get lodash.has @types/lodash isomorphic-unfetch formik
2626

2727
## Generating Routes
2828

@@ -35,7 +35,7 @@ Install required dependencies:
3535

3636
You can launch the server with
3737

38-
$ yarn dev
38+
yarn dev
3939

4040
Go to `http://localhost:3000/books/` to start using your app.
4141

client-generator/nuxtjs.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ The Nuxt.js Client Generator generates components for Server Side Rendered appli
88

99
Create a [Nuxt.js application](https://nuxtjs.org/guides/get-started/installation#using-create-nuxt-app). The easiest way is to execute:
1010

11-
$ npx create-nuxt-app your-app-name
12-
# or
13-
$ yarn create nuxt-app your-app-name
11+
```console
12+
npx create-nuxt-app your-app-name
13+
```
1414

15-
It will ask you some questions you can use these answers :
15+
or:
1616

17+
```console
18+
yarn create nuxt-app your-app-name
1719
```
20+
21+
It will ask you some questions you can use these answers :
22+
23+
```console
1824
Project name: your-app-name
1925
Programming language: JavaScript
2026
Package manager: Yarn
@@ -30,8 +36,10 @@ Deployment target: Static (Static/JAMStack hosting)
3036

3137
Install required dependencies:
3238

33-
$ yarn add moment lodash vue-i18n vuelidate vuex-map-fields nuxt-i18n
34-
# yarn add --dev @nuxtjs/vuetify @nuxtjs/fontawesome
39+
```console
40+
yarn add moment lodash vue-i18n vuelidate vuex-map-fields nuxt-i18n
41+
yarn add --dev @nuxtjs/vuetify @nuxtjs/fontawesome
42+
```
3543

3644
## Updating nuxtjs config
3745

@@ -48,19 +56,22 @@ Update your `nuxt.config.js` with following:
4856
// to avoid name conflicts in generators
4957
components: false,
5058
```
59+
5160
## Generating Routes
5261

53-
$ npx @api-platform/client-generator https://demo.api-platform.com . --generator nuxt
54-
# Replace the URL by the entrypoint of your Hydra-enabled API
62+
```console
63+
npx @api-platform/client-generator https://demo.api-platform.com . --generator nuxt
64+
```
5565

56-
> Note: Omit the resource flag to generate files for all resource types exposed by the API.
66+
Replace the URL by the entrypoint of your Hydra-enabled API
5767

58-
## Updating default layout
68+
**Note:** Omit the resource flag to generate files for all resource types exposed by the API.
5969

70+
## Updating default layout
6071

6172
Update your `layouts/default.vue` with following:
6273

63-
```javascript
74+
```vue
6475
<template>
6576
<v-app>
6677
<alert />
@@ -132,9 +143,11 @@ export default {
132143

133144
## Starting the Project
134145

135-
You can launch the server with
146+
You can launch the server with:
136147

137-
$ yarn dev
148+
```console
149+
yarn dev
150+
````
138151

139152
Go to `https://localhost:3000/books/` to start using your app.
140153

client-generator/quasar.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@
33
Create a Quasar Framework application using
44
[quasar-cli](https://quasar.dev/quasar-cli/installation):
55

6-
$ quasar create my-app
7-
$ cd my-app
6+
```console
7+
quasar create my-app
8+
cd my-app
9+
```
810

911
In the app directory, generate the files for the resource you want:
1012

11-
$ npx @api-platform/client-generator https://demo.api-platform.com src/ --generator quasar --resource foo
12-
# Replace the URL by the entrypoint of your Hydra-enabled API
13-
# Omit the resource flag to generate files for all resource types exposed by the API
13+
```console
14+
npx @api-platform/client-generator https://demo.api-platform.com src/ --generator quasar --resource foo
15+
```
16+
17+
Replace the URL by the entrypoint of your Hydra-enabled API.
18+
Omit the resource flag to generate files for all resource types exposed by the API.
1419

15-
The code is ready to be executed! Register the generated routes in `src/router/routes.js`
20+
The code is ready to be executed! Register the generated routes:
1621

1722
```javascript
23+
// src/router/routes.js
1824
import fooRoutes from '../generated/router/foo';
1925

2026
const routes = [
@@ -24,12 +30,12 @@ const routes = [
2430
children: [
2531
...fooRoutes
2632
],
27-
2833
```
2934
30-
and store modules in the `src/store/index.js` file.
35+
And add the modules to the store:
3136
3237
```javascript
38+
// src/store/index.js
3339
// Replace "foo" with the name of the resource type
3440
import foo from '../generated/store/modules/foo/';
3541

@@ -38,12 +44,12 @@ export default function(/* { ssrContext } */) {
3844
modules: {
3945
foo,
4046
},
41-
4247
```
4348
44-
Make sure to update the `quasar.conf.js` file with the following:
49+
Finally, make sure to update the config:
4550
4651
```javascript
52+
// quasar.conf.js
4753
framework: {
4854
components: [
4955
'QTable',
@@ -63,12 +69,12 @@ framework: {
6369
'QCheckbox',
6470
'QPopupProxy'
6571

66-
...
72+
// ...
6773
],
6874
directives: [..., 'ClosePopup'],
6975
plugins: ['Notify'],
7076
config: {
71-
...
77+
// ...
7278
notify: {
7379
position: 'top',
7480
multiLine: true,

0 commit comments

Comments
 (0)