Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 8c4f2bc

Browse files
authored
Prettier fixes (#1967)
A while back we adjustted our prettier config, but forgot to run it over non-js/ts files
1 parent 4e9a11e commit 8c4f2bc

File tree

29 files changed

+121
-119
lines changed

29 files changed

+121
-119
lines changed

.github/ISSUE_TEMPLATE/BUG_REPORT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: '🐛 Bug Report'
33
about: Something isn't working
4-
labels: "Type: Bug 🐛"
4+
labels: 'Type: Bug 🐛'
55
---
66

77
## Overview

.github/ISSUE_TEMPLATE/ENHANCEMENT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: '📈 Enhancement'
33
about: Enhancement to our codebase that isn't a adding or changing a feature
4-
labels: "Type: Enhancement 📈"
4+
labels: 'Type: Enhancement 📈'
55
---
66

77
## Overview

.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: '🙌 Feature Request'
33
about: Suggest a new feature, or changes to an existing one
4-
labels: "Type: Feature Request :raised_hands:"
4+
labels: 'Type: Feature Request :raised_hands:'
55
---
66

77
## Overview

gems/quilt_rails/test/dummy/config/storage.yml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ test:
55
local:
66
service: Disk
77
root: <%= Rails.root.join("storage") %>
8-
98
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
109
# amazon:
1110
# service: S3

packages/graphql-fixtures/migration-guide.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ However, if you were using `fillGraphQL` and expected to receive the data, this
99
```ts
1010
const fillGraphQL = createFiller(/* options */);
1111
const data = fillGraphQL(myQuery);
12-
const graphQL = createGraphQL({ MyQuery: data });
12+
const graphQL = createGraphQL({MyQuery: data});
1313

1414
/* ... */
1515

@@ -22,9 +22,9 @@ You have two options to update code like what is shown above:
2222

2323
```ts
2424
const fillGraphQL = createFiller(/* options */);
25-
const someDataOnTheQuery = "foo";
26-
const fillMyQuery = fillGraphQL(myQuery, { someDataOnTheQuery });
27-
const graphQL = createGraphQL({ MyQuery: fillMyQuery });
25+
const someDataOnTheQuery = 'foo';
26+
const fillMyQuery = fillGraphQL(myQuery, {someDataOnTheQuery});
27+
const graphQL = createGraphQL({MyQuery: fillMyQuery});
2828

2929
/* ... */
3030

@@ -36,8 +36,8 @@ expect(something).toBe(someDataOnTheQuery);
3636
```ts
3737
const fillGraphQL = createFiller(/* options */);
3838
const fillMyQuery = fillGraphQL(myQuery);
39-
const data = fillMyQuery({ query: myQuery });
40-
const graphQL = createGraphQL({ MyQuery: data });
39+
const data = fillMyQuery({query: myQuery});
40+
const graphQL = createGraphQL({MyQuery: data});
4141

4242
/* ... */
4343

packages/graphql-testing/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The `wrap()` method allows you to wrap all GraphQL resolutions in a function cal
6464
const myComponent = mount(<MyComponent />);
6565
const graphQL = createGraphQL(mocks);
6666

67-
graphQL.wrap(resolve => myComponent.act(resolve));
67+
graphQL.wrap((resolve) => myComponent.act(resolve));
6868

6969
// Before, calling this could cause warnings about state updates happening outside
7070
// of act(). Now, all GraphQL resolutions are safely wrapped in myComponent.act().
@@ -87,7 +87,7 @@ const graphQL = createGraphQL({
8787
},
8888
});
8989

90-
graphQL.wrap(resolve => myComponent.act(resolve));
90+
graphQL.wrap((resolve) => myComponent.act(resolve));
9191
await graphQL.resolveAll();
9292

9393
graphQL.update({

packages/graphql-typescript-definitions/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ const builder = new Builder({
266266
schemaTypesPath: 'app/graphql/types',
267267
});
268268

269-
builder.on('build', build => {
269+
builder.on('build', (build) => {
270270
// See the source file for details on the shape of the object returned here
271271
console.log(build);
272272
});
273273

274-
builder.on('error', error => {
274+
builder.on('error', (error) => {
275275
console.error(error);
276276
});
277277

packages/graphql-validate-fixtures/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ yarn run graphql-validate-fixtures 'src/**/fixtures/**/*.graphql.json'
4949
const {evaluateFixtures} = require('graphql-validate-fixtures');
5050
evaluateFixtures({
5151
fixturePaths: ['test/fixtures/one.json', 'test/fixtures/two.json'],
52-
}).then(results => {
52+
}).then((results) => {
5353
// See the TypeScript definition file for more details on the
5454
// structure of the `results`
55-
results.forEach(result => console.log(result));
55+
results.forEach((result) => console.log(result));
5656
});
5757
```

packages/koa-shopify-webhooks/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ app.use(
7878
topic: 'PRODUCTS_CREATE',
7979
accessToken,
8080
shop,
81-
apiVersion: ApiVersion.Unstable
81+
apiVersion: ApiVersion.Unstable,
8282
});
8383

8484
if (registration.success) {
@@ -106,7 +106,7 @@ app.use(
106106

107107
app.use(verifyRequest());
108108

109-
app.use(ctx => {
109+
app.use((ctx) => {
110110
/* app code */
111111
});
112112
```
@@ -144,15 +144,15 @@ app.use(
144144
topic: 'PRODUCTS_CREATE',
145145
accessToken,
146146
shop,
147-
apiVersion: ApiVersion.Unstable
147+
apiVersion: ApiVersion.Unstable,
148148
});
149149

150150
await registerWebhook({
151151
address: 'www.mycool-app.com/webhooks/orders/create',
152152
topic: 'ORDERS_CREATE',
153153
accessToken,
154154
shop,
155-
apiVersion: ApiVersion.Unstable
155+
apiVersion: ApiVersion.Unstable,
156156
});
157157

158158
ctx.redirect('/');

packages/performance/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you want to listen for events, you can use the `on` method. There are three e
3131
```ts
3232
// Listen for completed navigations. If you call this after the initial load
3333
// "navigation", your handler will immediately be invoked with that object.
34-
performance.on('navigation', navigation => {});
34+
performance.on('navigation', (navigation) => {});
3535

3636
// Listen for the start of new navigations.
3737
performance.on('inflightNavigation', () => {});
@@ -42,15 +42,15 @@ performance.on('inflightNavigation', () => {});
4242
// the full set of possible events. If you add your listener after some of these
4343
// events have been triggered, it will immediately be invoked once for each
4444
// previously-triggered event.
45-
performance.on('lifecycleEvent', event => {});
45+
performance.on('lifecycleEvent', (event) => {});
4646
```
4747

4848
The `on` method returns a clean-up function that you can invoke when you're done listening on the event:
4949

5050
```ts
5151
const cleanupNavigationListener = performance.on(
5252
'navigation',
53-
navigation => {},
53+
(navigation) => {},
5454
);
5555

5656
cleanupNavigationListener();

packages/react-async/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ This component might be rendered when the URL matches `/products/:id`. If we wan
305305
```tsx
306306
<PrefetchRoute
307307
path={/^\/products\/(\d+)$/}
308-
render={url => {
308+
render={(url) => {
309309
const id = url.pathname.split('/').pop();
310310
return <ProductDetails.Prefetch id={id} />;
311311
}}
@@ -379,7 +379,7 @@ const ExpensiveFileContext = createAsyncContext({
379379
// and use the consumer to access the value:
380380

381381
<ExpensiveFileContext.Consumer>
382-
{file => (file ? <CsvViewer file={file} /> : null)}
382+
{(file) => (file ? <CsvViewer file={file} /> : null)}
383383
</ExpensiveFileContext.Consumer>;
384384
```
385385

packages/react-cookie/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function renderApp(ctx: Context) {
4242
const app = <App />;
4343

4444
await extract(app, {
45-
decorate: element => (
45+
decorate: (element) => (
4646
<NetworkContext.Provider value={networkManager}>
4747
{element}
4848
</NetworkContext.Provider>
@@ -95,7 +95,7 @@ import {useCookie} from '@shopify/react-cookie';
9595

9696
function SomeComponent() {
9797
const [cookie, setCookie] = useCookie('fooCookie');
98-
const handleChange = event => setCookie(event.target.value);
98+
const handleChange = (event) => setCookie(event.target.value);
9999
const removeCookie = () => setCookie();
100100

101101
return (

packages/react-effect/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function App() {
120120
return (
121121
<Provider value={new StatefulManager()}>
122122
<Consumer>
123-
{manager => <Effect perform={() => (manager.value = true)} />}
123+
{(manager) => <Effect perform={() => (manager.value = true)} />}
124124
</Consumer>
125125
</Provider>
126126
);
@@ -137,7 +137,7 @@ export default function App({manager}) {
137137
return (
138138
<Provider value={manager}>
139139
<Consumer>
140-
{manager => <Effect perform={() => (manager.value = true)} />}
140+
{(manager) => <Effect perform={() => (manager.value = true)} />}
141141
</Consumer>
142142
</Provider>
143143
);

packages/react-effect/documentation/migrating-version-1-to-2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Manager {
3131

3232
<Context.Provider value={new Manager()}>
3333
<Context.Consumer>
34-
{manager => (
34+
{(manager) => (
3535
<Effect kind={manager.effect} perform={doSomethingWithManager(manager)} />
3636
)}
3737
</Context.Consumer>

packages/react-form-state/docs/building-forms.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function MyComponent() {
4242
description: 'Cool product',
4343
}}
4444
>
45-
{formDetails => {
45+
{(formDetails) => {
4646
const {fields} = formDetails;
4747
const {title, description} = fields;
4848

@@ -92,7 +92,7 @@ function MyComponent() {
9292
description: 'Cool product',
9393
}}
9494
>
95-
{formDetails => {
95+
{(formDetails) => {
9696
const {fields} = formDetails;
9797

9898
return (
@@ -132,7 +132,7 @@ const fakeErrorResult = {error: [{message: 'api is not real'}]};
132132

133133
// simple async function that fakes a failing api call
134134
export function fakeApiCall(data: any) {
135-
return new Promise(resolve => {
135+
return new Promise((resolve) => {
136136
setTimeout(() => {
137137
resolve(fakeErrorResult);
138138
}, 2000);
@@ -165,7 +165,7 @@ export function MyPage() {
165165
{!valid && (
166166
<Banner status="critical">
167167
<ul>
168-
{errors.map(error => (
168+
{errors.map((error) => (
169169
<li key={`${error.message}${error.field}`}>
170170
{error.message}
171171
</li>
@@ -274,7 +274,7 @@ export function MyPage() {
274274
export type ValidatorDictionary<Fields> = {
275275
[FieldPath in keyof Fields]: MaybeArray<
276276
ValidationFunction<Fields[FieldPath], Fields>
277-
>
277+
>;
278278
};
279279

280280
interface ValidationFunction<Value, Fields> {
@@ -359,7 +359,7 @@ function MyComponent() {
359359
},
360360
}}
361361
>
362-
{formDetails => {
362+
{(formDetails) => {
363363
const {fields} = formDetails;
364364

365365
return (
@@ -401,7 +401,7 @@ function MyComponent() {
401401
console.log('I will not be run if title is too long');
402402
}}
403403
>
404-
{formDetails => {
404+
{(formDetails) => {
405405
const {errors, fields, submit} = formDetails;
406406

407407
const errorBanner = Boolean(errors.length) && (
@@ -706,7 +706,7 @@ function CreateProductPage({initialValues}: Props) {
706706
return [{message: 'server error'}];
707707
}}
708708
>
709-
{formDetails => {
709+
{(formDetails) => {
710710
const {fields, dirty, reset, submit, submitting, errors} = formDetails;
711711
const {
712712
title,
@@ -733,7 +733,7 @@ function CreateProductPage({initialValues}: Props) {
733733
const errorBanner = errors.length > 0 && (
734734
<Banner status="critical">
735735
<ul>
736-
{errors.map(error => (
736+
{errors.map((error) => (
737737
<li key={`${error.message}${error.field}`}>{error.message}</li>
738738
))}
739739
</ul>

packages/react-form-state/docs/validators.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function MyComponent() {
4646
],
4747
}}
4848
>
49-
{formDetails => {
49+
{(formDetails) => {
5050
const {fields} = formDetails;
5151

5252
return (
@@ -118,7 +118,7 @@ import {validate, ErrorContent} from '@shopify/react-form-state';
118118

119119
export function validEmail(input: string, errorContent: ErrorContent) {
120120
// example only
121-
return validate(input => /+\@.+\..+/.test(input), errorContent);
121+
return validate((input) => /+\@.+\..+/.test(input), errorContent);
122122
}
123123
```
124124

0 commit comments

Comments
 (0)