Skip to content

Commit a499b1b

Browse files
upgrade prettier
1 parent 60ae656 commit a499b1b

Some content is hidden

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

44 files changed

+127
-110
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defaults: &defaults
55
docker:
66
- image: circleci/node:12-browsers
77
environment:
8-
TZ: '/usr/share/zoneinfo/America/Los_Angeles'
8+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
99

1010
aliases:
1111
# Circle related commands
@@ -122,7 +122,7 @@ workflows:
122122
- build
123123

124124
- release:
125-
context: '@auto-canary'
125+
context: "@auto-canary"
126126
requires:
127127
- test
128128
- lint

.github/ISSUE_TEMPLATE/bug_report.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
4+
title: ""
55
labels: bug
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Describe the bug**
@@ -30,6 +29,7 @@ assignees: ''
3029
<!-- Please run `npx auto info` and put the results in the section below -->
3130

3231
```txt
32+
3333
```
3434

3535
**Additional context**

.github/ISSUE_TEMPLATE/feature_request.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
4+
title: ""
55
labels: enhancement
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.prettierignore

+10-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
scripts/template-plugin/
1+
scripts/template-plugin/
2+
CHANGELOG.md
3+
coverage
4+
.next
5+
.mdx-data
6+
docs/out
7+
docs/generated
8+
dist/
9+
test-plugin-malformed.js
10+
lerna.json

docs/pages/blog.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import { BlogIndex } from "next-ignite";
33
/** The blog index */
44
const Blog = () => <BlogIndex />;
55

6-
export default Blog;
6+
export default Blog;

docs/pages/blog/using-shipit.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ image: https://images.unsplash.com/photo-1556473062-062e556b0920?ixlib=rb-1.2.1&
33
title: Stress-free Continuous Delivery with auto
44
author: Andrew Lisowski
55
6-
date: 'Thu, 12 Mar 2020 23:00:02 -0700'
6+
date: "Thu, 12 Mar 2020 23:00:02 -0700"
77
---
88

99
`auto` makes releasing your code a breeze. Instead of manually calculating a version and doing your whole release process manually, `auto` takes care of it for you.

docs/pages/blog/v8.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ image: https://images.unsplash.com/photo-1485795046599-702122cd1267?crop=entropy
33
title: Announcing "auto" 8.0.0
44
author: Andrew Lisowski
55
6-
date: 'Thu, 12 Mar 2020 23:00:02 -0700'
6+
date: "Thu, 12 Mar 2020 23:00:02 -0700"
77
---
88

99
We are excited to announce the release of `auto` 8.0.0.

docs/pages/blog/why.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ image: https://cdn-images-1.medium.com/max/800/1*TVSbt7qsyleNiQ84la_log.jpeg
33
title: Death to Monotony
44
author: Adam Dierkens
55
url: https://github.intuit.com/adierkens
6-
date: 'Thu, 12 Mar 2020 23:00:02 -0700'
6+
date: "Thu, 12 Mar 2020 23:00:02 -0700"
77
---
88

99
# How auto can "handle the rest for you"

docs/pages/docs/build-platforms/jenkins.mdx

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ For `auto`'s prerelease to work you need to makes sure that you jenkins instance
9292

9393
![A screenshot of the jenkins configuration](/jenkins-next-branches.png)
9494

95-
2. Add this to the top of your `Jenkinsfile`.
95+
2. Add this to the top of your `Jenkinsfile`.
9696

9797
```groovy
9898
// Exit the branch build if not on "baseBranch" or a prerelease, but still do PR builds
@@ -120,6 +120,7 @@ For `auto`'s prerelease to work you need to makes sure that you jenkins instance
120120
}
121121
}
122122
```
123+
123124
4. Add a stage for the prerelease
124125

125126
```groovy
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
> :warning: For this to work you must have a \`GH_TOKEN\` set, ex: \`GH_TOKEN=YOUR_TOKEN auto create-labels\`
1+
> :warning: For this to work you must have a \`GH_TOKEN\` set, ex: \`GH_TOKEN=YOUR_TOKEN auto create-labels\`

docs/pages/docs/index.mdx

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ import { GetStarted } from "../../plugins/get-started-button";
77
media="(prefers-color-scheme: dark)"
88
className="w-full"
99
/>
10-
<img
11-
src="light-logo-large.png"
12-
alt="Auto Logo"
13-
className="w-full"
14-
/>
10+
<img src="light-logo-large.png" alt="Auto Logo" className="w-full" />
1511
</picture>
1612
</div>
1713

@@ -58,4 +54,4 @@ For instance, you could just use `auto changelog` to generate the changelog and
5854

5955
<div className="my-20 flex align-center justify-center w-full">
6056
<GetStarted />
61-
</div>
57+
</div>

docs/pages/docs/plugins/changelog-hooks.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This is where you hook into the changelog's hooks.
1414
See examples below.
1515

1616
```ts
17-
auto.hooks.onCreateChangelog.tapPromise('Giphy', (changelog, { bump }) => {});
17+
auto.hooks.onCreateChangelog.tapPromise("Giphy", (changelog, { bump }) => {});
1818
```
1919

2020
## addToBody

docs/pages/index.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
layout: 'nav-bar'
2+
layout: "nav-bar"
33
---
44

5-
import Home from '../plugins/home'
5+
import Home from "../plugins/home";
66

7-
<Home />
7+
<Home />

docs/public/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"description": "The documentation for using auto.",
88
"display": "standalone",
99
"orientation": "portrait"
10-
}
10+
}

packages/cli/__tests__/config.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test.each(commands.map((c) => [c.name, c] as const))(
77
(name, command) => {
88
const configOptions = globalOptions.props[name]?.props || {};
99

10-
expect.assertions(command.options?.filter((o) => o.config).length ?? 0);
10+
expect.assertions(command.options?.filter((o) => o.config).length ?? 0);
1111

1212
Object.keys(configOptions).forEach((option) => {
1313
expect(command.options.some((o) => camelCase(o.name) === option)).toBe(

packages/core/src/__tests__/auto-in-pr-ci.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jest.mock("@octokit/rest", () => {
3737
};
3838

3939
issues = {
40-
listLabelsOnIssue: jest.fn().mockReturnValue({ data: []}),
40+
listLabelsOnIssue: jest.fn().mockReturnValue({ data: [] }),
4141
};
4242

4343
hook = {
@@ -239,7 +239,7 @@ describe("next in ci", () => {
239239
jest.spyOn(console, "log").mockImplementation();
240240
auto.git!.getLatestTagInBranch = () => Promise.resolve("1.4.0-next.0");
241241
auto.release!.getSemverBump = () => Promise.resolve(SEMVER.patch);
242-
242+
243243
auto.git!.getLabels = () => Promise.resolve([]);
244244
expect(await auto.getVersion()).toBe(SEMVER.prepatch);
245245

packages/core/src/auto-args.ts

+18-16
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,25 @@ interface ForceOption {
159159
force?: boolean;
160160
}
161161

162-
export type ICanaryOptions = QuietOption & ForceOption & {
163-
/** Do not actually do anything */
164-
dryRun?: boolean;
165-
/** THe PR to attach the canary to */
166-
pr?: number;
167-
/** The build to attach the canary to */
168-
build?: number;
169-
/** The message used when attaching the canary version to a PR */
170-
message?: string | "false";
171-
};
162+
export type ICanaryOptions = QuietOption &
163+
ForceOption & {
164+
/** Do not actually do anything */
165+
dryRun?: boolean;
166+
/** THe PR to attach the canary to */
167+
pr?: number;
168+
/** The build to attach the canary to */
169+
build?: number;
170+
/** The message used when attaching the canary version to a PR */
171+
message?: string | "false";
172+
};
172173

173-
export type INextOptions = QuietOption & ForceOption & {
174-
/** Do not actually do anything */
175-
dryRun?: boolean;
176-
/** The message used when attaching the prerelease version to a PR */
177-
message?: string;
178-
};
174+
export type INextOptions = QuietOption &
175+
ForceOption & {
176+
/** Do not actually do anything */
177+
dryRun?: boolean;
178+
/** The message used when attaching the prerelease version to a PR */
179+
message?: string;
180+
};
179181

180182
export interface IInfoOptions {
181183
/** List some of the available plugins */

packages/core/src/config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ export default class Config {
9191
return {
9292
...rawConfig,
9393
labels,
94-
prereleaseBranches: rawConfig.prereleaseBranches || DEFAULT_PRERELEASE_BRANCHES,
94+
prereleaseBranches:
95+
rawConfig.prereleaseBranches || DEFAULT_PRERELEASE_BRANCHES,
9596
versionBranches:
9697
typeof rawConfig.versionBranches === "boolean" &&
9798
rawConfig.versionBranches

packages/core/src/git.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -883,13 +883,13 @@ export default class Git {
883883
"--merged",
884884
branch,
885885
]);
886-
886+
887887
return tags
888888
.split("\n")
889889
.map((tag) => tag.trim())
890890
.filter(Boolean);
891891
} catch (error) {
892-
return []
892+
return [];
893893
}
894894
}
895895

packages/core/src/utils/__tests__/exec-promise.test.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ test("fails correctly", async () => {
3030
});
3131

3232
test("fails correctly with GH_TOKEN", async () => {
33-
process.env.GH_TOKEN = '1234567890'
33+
process.env.GH_TOKEN = "1234567890";
3434
expect.assertions(1);
35-
return expect(exec("false", [process.env.GH_TOKEN])).rejects.toMatchInlineSnapshot(
35+
return expect(
36+
exec("false", [process.env.GH_TOKEN])
37+
).rejects.toMatchInlineSnapshot(
3638
`[Error: Running command 'false' with args [****7890] failed]`
3739
);
3840
});

packages/core/src/utils/__tests__/load-plugin.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jest.mock(
4141

4242
describe("loadPlugins", () => {
4343
beforeEach(() => {
44-
setLogLevel('quiet');
44+
setLogLevel("quiet");
4545
});
4646

4747
test("should load official plugins", () => {

packages/core/src/utils/load-plugins.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export function findPlugin(
132132

133133
if (exists(localPath)) {
134134
return localPath;
135-
}
136-
135+
}
136+
137137
if (extendedLocation) {
138138
localPath = path.join(
139139
extendedLocation.endsWith("package.json")

packages/core/src/utils/test-config/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
"auto": {
33
"plugins": [
44
"./some-other-plugin.js",
5-
["./some-plugin.js", {"foo": "bar"}]
5+
[
6+
"./some-plugin.js",
7+
{
8+
"foo": "bar"
9+
}
10+
]
611
]
712
}
813
}

packages/package-json-utils/src/index.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export interface IRepoConfig {
1919
}
2020

2121
/** Try to the the owner/repo from the package.json */
22-
export async function getRepo(): Promise<
23-
IRepoConfig | undefined
24-
> {
22+
export async function getRepo(): Promise<IRepoConfig | undefined> {
2523
const { repository } = await loadPackageJson();
2624

2725
if (!repository) {

plugins/gh-pages/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If you also want `auto` to run the build for you docs site provide the `buildCom
5757
}
5858
```
5959

60-
You *must* also make sure that your built website is in your `.gitignore`.
60+
You _must_ also make sure that your built website is in your `.gitignore`.
6161
Otherwise your release will fail because of uncommitted changes.
6262

6363
**.gitignore:**

plugins/magic-zero/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _Starting version:_ `0.0.1`
1313
`patch` => `0.0.2`
1414
`minor` => `0.0.2`
1515
`major` => `0.0.2`
16-
`graduate` => `0.1.0`
16+
`graduate` => `0.1.0`
1717

1818
**0.x.y:**
1919

@@ -22,7 +22,7 @@ _Starting version:_ `0.1.0`
2222
`patch` => `0.1.1`
2323
`minor` => `0.1.1`
2424
`major` => `0.2.0`
25-
`graduate` => `1.0.0`
25+
`graduate` => `1.0.0`
2626

2727
Once you're project is `>= 1.0.0` this plugin effectively does nothing.
2828

plugins/microsoft-teams/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ yarn add -D @auto-it/microsoft-teams
1515
## Usage
1616

1717
To use the plugin include it in your `.autorc`.
18-
To generate incoming webhook in microsoft teams, checkout [this blog](https://medium.com/@ankush.kumar133/get-started-with-microsoft-team-connectors-incoming-webhook-a330657993e7).
18+
To generate incoming webhook in microsoft teams, checkout [this blog](https://medium.com/@ankush.kumar133/get-started-with-microsoft-team-connectors-incoming-webhook-a330657993e7).
1919

2020
```json
2121
{

plugins/released/src/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ export default class ReleasedLabelPlugin implements IPlugin {
4343

4444
/** Initialize the plugin with it's options */
4545
constructor(options: Partial<IReleasedLabelPluginOptions> = {}) {
46-
this.options = merge(defaultOptions, options) as Required<
47-
IReleasedLabelPluginOptions
48-
>;
46+
this.options = merge(
47+
defaultOptions,
48+
options
49+
) as Required<IReleasedLabelPluginOptions>;
4950
}
5051

5152
/** Tap into auto plugin points. */

plugins/slack/README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ However, if you would like to configure it such that Slack _does_ post on prerel
5050
[
5151
"slack",
5252
{ "url": "https://url-to-your-slack-hook.com", "publishPreRelease": true }
53-
],
53+
]
5454
]
5555
}
5656
```
@@ -64,8 +64,11 @@ Additional Title to add at the start of the slack message.
6464
"plugins": [
6565
[
6666
"slack",
67-
{ "url": "https://url-to-your-slack-hook.com", "title": "My Cool Project" }
68-
],
67+
{
68+
"url": "https://url-to-your-slack-hook.com",
69+
"title": "My Cool Project"
70+
}
71+
]
6972
]
7073
}
7174
```

0 commit comments

Comments
 (0)