Skip to content

Commit 9249bca

Browse files
committed
add prettier and update deps
1 parent b7bca07 commit 9249bca

File tree

8 files changed

+2083
-762
lines changed

8 files changed

+2083
-762
lines changed

.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"extends": "airbnb",
33
"rules": {
4-
"jsx-a11y/img-has-alt": "off",
4+
"arrow-parens": "off",
55
"comma-dangle": "off",
66
"import/no-extraneous-dependencies": "off",
7-
"jsx-a11y/href-no-hash": "off"
7+
"jsx-a11y/href-no-hash": "off",
8+
"jsx-a11y/img-has-alt": "off"
89
},
910
"env": {
1011
"jest": true

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ const options = {
2929
registry.app.use('/graphql', graphql(options));
3030
```
3131

32-
> N.B.: `configuration` in the example above is the object used to configure the OpenComponents Registry
32+
> N.B.: `configuration` in the example above is the object used to configure the OpenComponents Registry.
3333
3434
![query-registry](query-registry-v1.1.3.png "query-registry")

__tests__/__snapshots__/shema.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ GraphQLSchema {
8282
"__Type": "__Type",
8383
"__TypeKind": "__TypeKind",
8484
},
85-
"astNode": null,
85+
"astNode": undefined,
8686
}
8787
`;

__tests__/index.test.js

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -69,48 +69,55 @@ describe('index', () => {
6969

7070
test('expect res setHeader and end to match snapshot', async () => {
7171
fetch.mockResponses(
72-
[JSON.stringify({
73-
href: options.baseUrl,
74-
ocVersion: '1.2.3',
75-
type: 'mock-registry'
76-
})],
77-
[JSON.stringify({
78-
name: 'oc-apod',
79-
description: 'This component displays picture, title, description and date of the NASA\'s Astronomy Picture of the Day',
80-
version: '1.3.0',
81-
allVersions: ['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.3.0'],
82-
oc: {
83-
parameters: {
84-
apiKey: {
85-
type: 'string',
86-
mandatory: true,
87-
example: 'DEMO_KEY',
88-
description: 'The NASA Open APIs key'
72+
[
73+
JSON.stringify({
74+
href: options.baseUrl,
75+
ocVersion: '1.2.3',
76+
type: 'mock-registry'
77+
})
78+
],
79+
[
80+
JSON.stringify({
81+
name: 'oc-apod',
82+
description:
83+
"This component displays picture, title, description and date of the NASA's Astronomy Picture of the Day",
84+
version: '1.3.0',
85+
allVersions: ['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.3.0'],
86+
oc: {
87+
parameters: {
88+
apiKey: {
89+
type: 'string',
90+
mandatory: true,
91+
example: 'DEMO_KEY',
92+
description: 'The NASA Open APIs key'
93+
}
8994
}
9095
}
91-
}
92-
})],
93-
[JSON.stringify({
94-
components: [
95-
`${options.baseUrl}oc-a-component`
96-
]
97-
})],
98-
[JSON.stringify({
99-
name: 'oc-a-component',
100-
description: 'Awesome OpenComponent',
101-
version: '4.5.6',
102-
allVersions: ['4.5.4', '4.5.5', '4.5.6'],
103-
oc: {
104-
parameters: {
105-
id: {
106-
type: 'string',
107-
mandatory: true,
108-
example: '789',
109-
description: 'The Id'
96+
})
97+
],
98+
[
99+
JSON.stringify({
100+
components: [`${options.baseUrl}oc-a-component`]
101+
})
102+
],
103+
[
104+
JSON.stringify({
105+
name: 'oc-a-component',
106+
description: 'Awesome OpenComponent',
107+
version: '4.5.6',
108+
allVersions: ['4.5.4', '4.5.5', '4.5.6'],
109+
oc: {
110+
parameters: {
111+
id: {
112+
type: 'string',
113+
mandatory: true,
114+
example: '789',
115+
description: 'The Id'
116+
}
110117
}
111118
}
112-
}
113-
})]
119+
})
120+
]
114121
);
115122

116123
const req = {
@@ -131,4 +138,3 @@ describe('index', () => {
131138
expect(JSON.parse(res.end.mock.calls)).toMatchSnapshot();
132139
});
133140
});
134-

0 commit comments

Comments
 (0)