Skip to content

Commit 493303a

Browse files
committed
fix(ci): lint all project files according to the new config
1 parent 53cefc8 commit 493303a

Some content is hidden

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

94 files changed

+2638
-2609
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
name: ⛔ Support Question
33
about: See https://api-platform.com/support/ for questions about using API Platform
4-
54
---
65

7-
We use GitHub issues only to discuss about bugs and new features.
6+
# Support question
7+
8+
We use GitHub issues only to discuss bugs and new features.
89
For this kind of questions about using API Platform, please use
9-
any of the support alternatives shown in https://api-platform.com/support/
10+
any of the support alternatives shown in [API Platform support](https://api-platform.com/support/).
1011

1112
Thanks!
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
22
name: 📄 Documentation issue
33
about: Report a documentation issue
4-
54
---

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fetch-depth: 0
2626

2727
- name: Lint
28-
uses: super-linter/super-linter@v7
28+
uses: super-linter/super-linter/slim@v7
2929
env:
3030
VALIDATE_EDITORCONFIG: false
3131
VALIDATE_JSCPD: false

.markdownlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
MD013:
23
line_length: 400
34
no-inline-html:

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ To have your code integrated in the API Platform documentation project, there ar
88

99
Before submitting your issue:
1010

11-
* Check if the bug is not already reported!
12-
* A clear title to resume the issue
13-
* A description of the workflow needed to reproduce the bug
11+
- Check if the bug is not already reported!
12+
- A clear title to resume the issue
13+
- A description of the workflow needed to reproduce the bug
1414

1515
> [!NOTE]
1616
> Don't hesitate giving as much information as you can.
@@ -24,13 +24,13 @@ By contributing to this project, you agree to abide by our [Code of Conduct](htt
2424
1. Fork this repository by clicking the "Fork" button at the top right of the `api-platform/docs` repository page.
2525

2626
2. Clone the forked repository to your local machine:
27-
```bash
28-
git clone https://github.com/your-username/repository-name.git
29-
```
27+
```bash
28+
git clone https://github.com/your-username/repository-name.git
29+
```
3030
3. Create a new branch for your contribution:
31-
```bash
32-
git switch -c docs-your-branch-name
33-
```
31+
```bash
32+
git switch -c docs-your-branch-name
33+
```
3434
4. Commit and push your changes
3535
5. Submit a Pull Request. You must decide on what branch your changes will be based depending of the nature of the change.
3636
See [the dedicated documentation entry](https://api-platform.com/docs/extra/releases/).

admin/components.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,28 @@ Deprecated resources are hidden by default, but you can add them back using an e
1414

1515
```javascript
1616
// App.js
17-
import { AdminGuesser, ResourceGuesser } from "@api-platform/admin";
17+
import { AdminGuesser, ResourceGuesser } from '@api-platform/admin';
1818

1919
const App = () => (
20-
<AdminGuesser
21-
dataProvider={dataProvider}
22-
authProvider={authProvider}>
20+
<AdminGuesser dataProvider={dataProvider} authProvider={authProvider}>
2321
<ResourceGuesser
2422
name="books"
2523
list={BooksList}
2624
show={BooksShow}
2725
edit={BooksEdit}
28-
create={BooksCreate} />
26+
create={BooksCreate}
27+
/>
2928
<ResourceGuesser name="authors" />
3029
</AdminGuesser>
31-
)
30+
);
3231

3332
export default App;
3433
```
3534

3635
#### Props
3736

3837
| Name | Type | Value | required | Description |
39-
|-------------------|---------|----------------|----------|----------------------------------------------------------------------------------|
38+
| ----------------- | ------- | -------------- | -------- | -------------------------------------------------------------------------------- |
4039
| dataProvider | object | dataProvider | yes | communicates with your API |
4140
| schemaAnalyzer | object | schemaAnalyzer | yes | retrieves resource type according to [Schema.org](https://schema.org) vocabulary |
4241
| theme | object | theme | no | theme of your Admin App |
@@ -50,19 +49,17 @@ Otherwise, you can pass it your own CRUD components using `create`, `list`, `edi
5049

5150
```javascript
5251
// App.js
53-
import { AdminGuesser, ResourceGuesser } from "@api-platform/admin";
52+
import { AdminGuesser, ResourceGuesser } from '@api-platform/admin';
5453

5554
const App = () => (
56-
<AdminGuesser
57-
dataProvider={dataProvider}
58-
schemaAnalyzer={schemaAnalyzer}
59-
>
55+
<AdminGuesser dataProvider={dataProvider} schemaAnalyzer={schemaAnalyzer}>
6056
<ResourceGuesser
6157
name="books"
6258
list={BooksList}
6359
show={BooksShow}
6460
create={BooksCreate}
65-
edit={BooksEdit} />
61+
edit={BooksEdit}
62+
/>
6663
<ResourceGuesser name="reviews" />
6764
</AdminGuesser>
6865
);
@@ -73,7 +70,7 @@ export default App;
7370
#### ResourceGuesser Props
7471

7572
| Name | Type | Value | required | Description |
76-
|------|--------|-------|----------|--------------------------|
73+
| ---- | ------ | ----- | -------- | ------------------------ |
7774
| name | string | - | yes | endpoint of the resource |
7875

7976
You can also use props accepted by React Admin [Resource component](https://marmelab.com/react-admin/Resource.html). For example, the props `list`, `show`, `create` or `edit`.
@@ -91,10 +88,10 @@ By default, `<ListGuesser>` comes with [Pagination](components.md#pagination).
9188

9289
```javascript
9390
// BooksList.js
94-
import { FieldGuesser, ListGuesser } from "@api-platform/admin";
95-
import { ReferenceField, TextField } from "react-admin";
91+
import { FieldGuesser, ListGuesser } from '@api-platform/admin';
92+
import { ReferenceField, TextField } from 'react-admin';
9693

97-
export const BooksList = props => (
94+
export const BooksList = (props) => (
9895
<ListGuesser {...props}>
9996
<FieldGuesser source="author" />
10097
<FieldGuesser source="title" />
@@ -107,9 +104,9 @@ export const BooksList = props => (
107104

108105
#### ListGuesser Props
109106

110-
| Name | Type | Value | required | Description |
111-
|----------|---------|-------|----------|-----------------------------------------|
112-
| filters | element | - | no | filters that can be applied to the list |
107+
| Name | Type | Value | required | Description |
108+
| ------- | ------- | ----- | -------- | --------------------------------------- |
109+
| filters | element | - | no | filters that can be applied to the list |
113110

114111
You can also use props accepted by React Admin [List](https://marmelab.com/react-admin/List.html).
115112

@@ -120,9 +117,9 @@ For simple inputs, you can pass as children API Platform Admin [InputGuesser](co
120117

121118
```javascript
122119
// BooksCreate.js
123-
import { CreateGuesser, InputGuesser } from "@api-platform/admin";
120+
import { CreateGuesser, InputGuesser } from '@api-platform/admin';
124121

125-
export const BooksCreate = props => (
122+
export const BooksCreate = (props) => (
126123
<CreateGuesser {...props}>
127124
<InputGuesser source="author" />
128125
<InputGuesser source="title" />
@@ -144,9 +141,9 @@ For simple inputs, you can use API Platform Admin [InputGuesser](components.md#i
144141

145142
```javascript
146143
// BooksEdit.js
147-
import { EditGuesser, InputGuesser } from "@api-platform/admin";
144+
import { EditGuesser, InputGuesser } from '@api-platform/admin';
148145

149-
export const BooksEdit = props => (
146+
export const BooksEdit = (props) => (
150147
<EditGuesser {...props}>
151148
<InputGuesser source="author" />
152149
<InputGuesser source="title" />
@@ -167,9 +164,9 @@ Displays a detailed page for one item. Based on React Admin [Show component](htt
167164

168165
```javascript
169166
// BooksShow.js
170-
import { FieldGuesser, ShowGuesser } from "@api-platform/admin";
167+
import { FieldGuesser, ShowGuesser } from '@api-platform/admin';
171168

172-
export const BooksShow = props => (
169+
export const BooksShow = (props) => (
173170
<ShowGuesser {...props}>
174171
<FieldGuesser source="author" />
175172
<FieldGuesser source="title" />
@@ -193,16 +190,16 @@ If you want to use other formats (see supported formats: `@api-platform/api-doc-
193190

194191
```javascript
195192
// App.js
196-
import { HydraAdmin, ResourceGuesser } from "@api-platform/admin";
193+
import { HydraAdmin, ResourceGuesser } from '@api-platform/admin';
197194

198195
const App = () => (
199196
<HydraAdmin
200197
entrypoint={entrypoint}
201198
dataProvider={dataProvider}
202199
authProvider={authProvider}
203-
>
204-
<ResourceGuesser name="books" />
205-
{ /* ... */ }
200+
>
201+
<ResourceGuesser name="books" />
202+
{/* ... */}
206203
</HydraAdmin>
207204
);
208205

@@ -212,12 +209,13 @@ export default App;
212209
#### HydraAdmin Props
213210

214211
| Name | Type | Value | required | Description |
215-
|--------------|---------------------|--------------|----------|------------------------------|
212+
| ------------ | ------------------- | ------------ | -------- | ---------------------------- |
216213
| entrypoint | string | - | yes | entrypoint of the API |
217-
| mercure | object&#124;boolean | * | no | configuration to use Mercure |
214+
| mercure | object&#124;boolean | \* | no | configuration to use Mercure |
218215
| dataProvider | object | dataProvider | no | hydra data provider to use |
219216

220217
\* `false` to explicitly disable, `true` to enable with default parameters or an object with the following properties:
218+
221219
- `hub`: the URL to your Mercure hub
222220
- `jwt`: a subscriber JWT to access your Mercure hub
223221
- `topicUrl`: the topic URL of your resources
@@ -241,17 +239,17 @@ If you want to use other formats (see supported formats: `@api-platform/api-doc-
241239

242240
```javascript
243241
// App.js
244-
import { OpenApiAdmin, ResourceGuesser } from "@api-platform/admin";
242+
import { OpenApiAdmin, ResourceGuesser } from '@api-platform/admin';
245243

246244
const App = () => (
247245
<OpenApiAdmin
248246
entrypoint={entrypoint}
249247
docEntrypoint={docEntrypoint}
250248
dataProvider={dataProvider}
251249
authProvider={authProvider}
252-
>
253-
<ResourceGuesser name="books" />
254-
{ /* ... */ }
250+
>
251+
<ResourceGuesser name="books" />
252+
{/* ... */}
255253
</OpenApiAdmin>
256254
);
257255

@@ -261,13 +259,14 @@ export default App;
261259
#### OpenApiAdmin Props
262260

263261
| Name | Type | Value | required | Description |
264-
|---------------|---------------------|-------|----------|------------------------------|
262+
| ------------- | ------------------- | ----- | -------- | ---------------------------- |
265263
| dataProvider | dataProvider | - | yes | data provider to use |
266264
| docEntrypoint | string | - | yes | doc entrypoint of the API |
267265
| entrypoint | string | - | yes | entrypoint of the API |
268-
| mercure | object&#124;boolean | * | no | configuration to use Mercure |
266+
| mercure | object&#124;boolean | \* | no | configuration to use Mercure |
269267

270268
\* `false` to explicitly disable, `true` to enable with default parameters or an object with the following properties:
269+
271270
- `hub`: the URL to your Mercure hub
272271
- `jwt`: a subscriber JWT to access your Mercure hub
273272
- `topicUrl`: the topic URL of your resources
@@ -291,23 +290,23 @@ Based on React Admin [field components](https://marmelab.com/react-admin/Fields.
291290

292291
```javascript
293292
// BooksShow.js
294-
import { FieldGuesser, ShowGuesser } from "@api-platform/admin";
293+
import { FieldGuesser, ShowGuesser } from '@api-platform/admin';
295294

296-
export const BooksShow = props => (
295+
export const BooksShow = (props) => (
297296
<ShowGuesser {...props}>
298297
<FieldGuesser source="author" />
299298
<FieldGuesser source="title" />
300299
<FieldGuesser source="rating" />
301300
<FieldGuesser source="description" />
302301
<FieldGuesser source="publicationDate" />
303302
</ShowGuesser>
304-
)
303+
);
305304
```
306305

307306
#### FieldGuesser Props
308307

309308
| Name | Type | Value | required | Description |
310-
|--------|--------|-------|----------|--------------------------------------|
309+
| ------ | ------ | ----- | -------- | ------------------------------------ |
311310
| source | string | - | yes | name of the property of the resource |
312311

313312
You can also use props accepted by React Admin [basic fields](https://marmelab.com/react-admin/Fields.html#basic-fields).
@@ -319,5 +318,5 @@ Uses React Admin [input components](https://marmelab.com/react-admin/Inputs.html
319318
#### InputGuesser Props
320319

321320
| Name | Type | Value | required | Description |
322-
|--------|--------|-------|----------|--------------------------------------|
321+
| ------ | ------ | ----- | -------- | ------------------------------------ |
323322
| source | string | - | yes | name of the property of the resource |

admin/customizing.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ However, it's also possible to display only specific resources, and to order the
1616
To cherry-pick the resources to make available through the admin, pass a list of `<ResourceGuesser>` components as children of the root component:
1717

1818
```javascript
19-
import { HydraAdmin, ResourceGuesser } from "@api-platform/admin";
19+
import { HydraAdmin, ResourceGuesser } from '@api-platform/admin';
2020

2121
export default () => (
2222
<HydraAdmin entrypoint="https://demo.api-platform.com">
@@ -40,10 +40,10 @@ import {
4040
HydraAdmin,
4141
ResourceGuesser,
4242
ListGuesser,
43-
FieldGuesser
44-
} from "@api-platform/admin";
43+
FieldGuesser,
44+
} from '@api-platform/admin';
4545

46-
const ReviewsList = props => (
46+
const ReviewsList = (props) => (
4747
<ListGuesser {...props}>
4848
<FieldGuesser source="author" />
4949
<FieldGuesser source="book" />
@@ -74,10 +74,10 @@ import {
7474
HydraAdmin,
7575
ResourceGuesser,
7676
ShowGuesser,
77-
FieldGuesser
78-
} from "@api-platform/admin";
77+
FieldGuesser,
78+
} from '@api-platform/admin';
7979

80-
const ReviewsShow = props => (
80+
const ReviewsShow = (props) => (
8181
<ShowGuesser {...props}>
8282
<FieldGuesser source="author" />
8383
<FieldGuesser source="book" />
@@ -110,10 +110,10 @@ import {
110110
HydraAdmin,
111111
ResourceGuesser,
112112
CreateGuesser,
113-
InputGuesser
114-
} from "@api-platform/admin";
113+
InputGuesser,
114+
} from '@api-platform/admin';
115115

116-
const ReviewsCreate = props => (
116+
const ReviewsCreate = (props) => (
117117
<CreateGuesser {...props}>
118118
<InputGuesser source="author" />
119119
<InputGuesser source="book" />
@@ -148,10 +148,10 @@ import {
148148
HydraAdmin,
149149
ResourceGuesser,
150150
EditGuesser,
151-
InputGuesser
152-
} from "@api-platform/admin";
151+
InputGuesser,
152+
} from '@api-platform/admin';
153153

154-
const ReviewsEdit = props => (
154+
const ReviewsEdit = (props) => (
155155
<EditGuesser {...props}>
156156
<InputGuesser source="author" />
157157
<InputGuesser source="book" />
@@ -167,7 +167,7 @@ const ReviewsEdit = props => (
167167

168168
export default () => (
169169
<HydraAdmin entrypoint="https://demo.api-platform.com">
170-
<ResourceGuesser edit={ReviewsEdit}/>
170+
<ResourceGuesser edit={ReviewsEdit} />
171171
{/* ... */}
172172
</HydraAdmin>
173173
);

admin/file-upload.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import {
1313
HydraAdmin,
1414
ResourceGuesser,
1515
CreateGuesser,
16-
} from "@api-platform/admin";
17-
import { FileField, FileInput } from "react-admin";
16+
} from '@api-platform/admin';
17+
import { FileField, FileInput } from 'react-admin';
1818

19-
const MediaObjectsCreate = props => (
19+
const MediaObjectsCreate = (props) => (
2020
<CreateGuesser {...props}>
2121
<FileInput source="file">
2222
<FileField source="src" title="title" />

0 commit comments

Comments
 (0)