Skip to content

Commit 4708b6b

Browse files
committed
style: reformat stuff that must have been formatted before 47d2dad
1 parent 80c1545 commit 4708b6b

22 files changed

+549
-552
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# CHANGELOG
22

3-
The changelog is automatically updated using [semantic-release](https://github.com/semantic-release/semantic-release).
4-
You can see it on the [releases page](../../releases).
3+
The changelog is automatically updated using
4+
[semantic-release](https://github.com/semantic-release/semantic-release). You
5+
can see it on the [releases page](../../releases).

CONTRIBUTING.md

+19-18
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Thanks for being willing to contribute!
44

5-
**Working on your first Pull Request?** You can learn how from this _free_ series
6-
[How to Contribute to an Open Source Project on GitHub][egghead]
5+
**Working on your first Pull Request?** You can learn how from this _free_
6+
series [How to Contribute to an Open Source Project on GitHub][egghead]
77

88
## Project setup
99

@@ -21,24 +21,23 @@ Thanks for being willing to contribute!
2121
> git branch --set-upstream-to=upstream/master master
2222
> ```
2323
>
24-
> This will add the original repository as a "remote" called "upstream,"
25-
> Then fetch the git information from that remote, then set your local `master`
26-
> branch to use the upstream master branch whenever you run `git pull`.
27-
> Then you can make all of your pull request branches based on this `master`
28-
> branch. Whenever you want to update your version of `master`, do a regular
29-
> `git pull`.
24+
> This will add the original repository as a "remote" called "upstream," Then
25+
> fetch the git information from that remote, then set your local `master`
26+
> branch to use the upstream master branch whenever you run `git pull`. Then you
27+
> can make all of your pull request branches based on this `master` branch.
28+
> Whenever you want to update your version of `master`, do a regular `git pull`.
3029
3130
## Committing and Pushing changes
3231
3332
This project uses [`semantic-release`][semantic-release] to do automatic
34-
releases and generate a changelog based on the commit history. So we follow
35-
[a convention][convention] for commit messages. You don't have to follow this
33+
releases and generate a changelog based on the commit history. So we follow [a
34+
convention][convention] for commit messages. You don't have to follow this
3635
convention if you don't want to. Just know that when we merge your commit, we'll
3736
probably use "Squash and Merge" so we can change the commit message :)
3837
3938
Please make sure to run the tests before you commit your changes. You can run
40-
`npm run test:update` which will update any snapshots that need updating.
41-
Make sure to include those changes (if they exist) in your commit.
39+
`npm run test:update` which will update any snapshots that need updating. Make
40+
sure to include those changes (if they exist) in your commit.
4241
4342
### opt in/out of git hooks
4443
@@ -53,10 +52,10 @@ pre-commit
5352
```
5453
5554
One of the things that the git hooks does is automatically format the files you
56-
change. It does this by reformating the entire file and running `git add` on
57-
the file after. This breaks workflows where you're trying to commit portions of
58-
the file only. You can always run your commit with `--no-verify`, but if this
59-
is a bummer to your workflow, you can add an `.opt-out` file with the contents:
55+
change. It does this by reformating the entire file and running `git add` on the
56+
file after. This breaks workflows where you're trying to commit portions of the
57+
file only. You can always run your commit with `--no-verify`, but if this is a
58+
bummer to your workflow, you can add an `.opt-out` file with the contents:
6059
6160
```
6261
autoformat
@@ -69,7 +68,9 @@ Please checkout the [the open issues][issues]
6968
Also, please watch the repo and respond to questions/bug reports/feature
7069
requests! Thanks!
7170
72-
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
71+
[egghead]:
72+
https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
7373
[semantic-release]: https://npmjs.com/package/semantic-release
74-
[convention]: https://github.com/conventional-changelog/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
74+
[convention]:
75+
https://github.com/conventional-changelog/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
7576
[issues]: https://github.com/hoverinc/hover-javascript/issues

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ Or, for `babel`, a `.babelrc` with:
8585
Or, for `jest`:
8686

8787
```javascript
88-
const { jest: jestConfig } = require('@hover/javascript/jest');
88+
const {jest: jestConfig} = require('@hover/javascript/jest')
8989
module.exports = Object.assign(jestConfig, {
9090
// your overrides here
9191

9292
// for test written in Typescript, add:
9393
transform: {
9494
'\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest/preprocessor.js',
9595
},
96-
});
96+
})
9797
```
9898

9999
> Note: `hover-scripts` intentionally does not merge things for you when you

other/CODE_OF_CONDUCT.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
In the interest of fostering an open and welcoming environment, we as
2121
contributors and maintainers pledge to making participation in our project and
2222
our community a harassment-free experience for everyone, regardless of age, body
23-
size, disability, ethnicity, gender identity and expression, level of experience,
24-
nationality, personal appearance, race, religion, or sexual identity and
25-
orientation.
23+
size, disability, ethnicity, gender identity and expression, level of
24+
experience, nationality, personal appearance, race, religion, or sexual identity
25+
and orientation.
2626

2727
## Our Standards
2828

@@ -52,11 +52,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
5252
behavior and are expected to take appropriate and fair corrective action in
5353
response to any instances of unacceptable behavior.
5454

55-
Project maintainers have the right and responsibility to remove, edit, or
56-
reject comments, commits, code, wiki edits, issues, and other contributions
57-
that are not aligned to this Code of Conduct, or to ban temporarily or
58-
permanently any contributor for other behaviors that they deem inappropriate,
59-
threatening, offensive, or harmful.
55+
Project maintainers have the right and responsibility to remove, edit, or reject
56+
comments, commits, code, wiki edits, issues, and other contributions that are
57+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
58+
contributor for other behaviors that they deem inappropriate, threatening,
59+
offensive, or harmful.
6060

6161
## Scope
6262

@@ -73,17 +73,18 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be
7373
reported by contacting the project team at [email protected]. All
7474
complaints will be reviewed and investigated and will result in a response that
7575
is deemed necessary and appropriate to the circumstances. The project team is
76-
obligated to maintain confidentiality with regard to the reporter of an incident.
77-
Further details of specific enforcement policies may be posted separately.
76+
obligated to maintain confidentiality with regard to the reporter of an
77+
incident. Further details of specific enforcement policies may be posted
78+
separately.
7879

7980
Project maintainers who do not follow or enforce the Code of Conduct in good
8081
faith may face temporary or permanent repercussions as determined by other
8182
members of the project's leadership.
8283

8384
## Attribution
8485

85-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
86-
available at [http://contributor-covenant.org/version/1/4][version]
86+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
87+
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
8788

8889
[homepage]: http://contributor-covenant.org
8990
[version]: http://contributor-covenant.org/version/1/4/

other/MAINTAINING.md

+42-35
Original file line numberDiff line numberDiff line change
@@ -18,60 +18,67 @@ This is documentation for maintainers of this project.
1818

1919
## Code of Conduct
2020

21-
Please review, understand, and be an example of it. Violations of the code of conduct are
22-
taken seriously, even (especially) for maintainers.
21+
Please review, understand, and be an example of it. Violations of the code of
22+
conduct are taken seriously, even (especially) for maintainers.
2323

2424
## Issues
2525

26-
We want to support and build the community. We do that best by helping people learn to solve
27-
their own problems. We have an issue template and hopefully most folks follow it. If it's
28-
not clear what the issue is, invite them to create a minimal reproduction of what they're trying
29-
to accomplish or the bug they think they've found.
26+
We want to support and build the community. We do that best by helping people
27+
learn to solve their own problems. We have an issue template and hopefully most
28+
folks follow it. If it's not clear what the issue is, invite them to create a
29+
minimal reproduction of what they're trying to accomplish or the bug they think
30+
they've found.
3031

3132
Once it's determined that a code change is necessary, point people to
32-
[makeapullrequest.com](http://makeapullrequest.com) and invite them to make a pull request.
33-
If they're the one who needs the feature, they're the one who can build it. If they need
34-
some hand holding and you have time to lend a hand, please do so. It's an investment into
35-
another human being, and an investment into a potential maintainer.
33+
[makeapullrequest.com](http://makeapullrequest.com) and invite them to make a
34+
pull request. If they're the one who needs the feature, they're the one who can
35+
build it. If they need some hand holding and you have time to lend a hand,
36+
please do so. It's an investment into another human being, and an investment
37+
into a potential maintainer.
3638

37-
Remember that this is open source, so the code is not yours, it's ours. If someone needs a change
38-
in the codebase, you don't have to make it happen yourself. Commit as much time to the project
39-
as you want/need to. Nobody can ask any more of you than that.
39+
Remember that this is open source, so the code is not yours, it's ours. If
40+
someone needs a change in the codebase, you don't have to make it happen
41+
yourself. Commit as much time to the project as you want/need to. Nobody can ask
42+
any more of you than that.
4043

4144
## Pull Requests
4245

43-
As a maintainer, you're fine to make your branches on the main repo or on your own fork. Either
44-
way is fine.
46+
As a maintainer, you're fine to make your branches on the main repo or on your
47+
own fork. Either way is fine.
4548

46-
When we receive a pull request, a travis build is kicked off automatically (see the `.travis.yml`
47-
for what runs in the travis build). We avoid merging anything that breaks the travis build.
49+
When we receive a pull request, a travis build is kicked off automatically (see
50+
the `.travis.yml` for what runs in the travis build). We avoid merging anything
51+
that breaks the travis build.
4852

49-
Please review PRs and focus on the code rather than the individual. You never know when this is
50-
someone's first ever PR and we want their experience to be as positive as possible, so be
51-
uplifting and constructive.
53+
Please review PRs and focus on the code rather than the individual. You never
54+
know when this is someone's first ever PR and we want their experience to be as
55+
positive as possible, so be uplifting and constructive.
5256

5357
When you merge the pull request, 99% of the time you should use the
54-
[Squash and merge](https://help.github.com/articles/merging-a-pull-request/) feature. This keeps
55-
our git history clean, but more importantly, this allows us to make any necessary changes to the
56-
commit message so we release what we want to release. See the next section on Releases for more
57-
about that.
58+
[Squash and merge](https://help.github.com/articles/merging-a-pull-request/)
59+
feature. This keeps our git history clean, but more importantly, this allows us
60+
to make any necessary changes to the commit message so we release what we want
61+
to release. See the next section on Releases for more about that.
5862

5963
## Release
6064

61-
Our releases are automatic. They happen whenever code lands into `master`. A travis build gets
62-
kicked off and if it's successful, a tool called
63-
[`semantic-release`](https://github.com/semantic-release/semantic-release) is used to
64-
automatically publish a new release to npm as well as a changelog to GitHub. It is only able to
65-
determine the version and whether a release is necessary by the git commit messages. With this
66-
in mind, **please brush up on [the commit message convention][commit] which drives our releases.**
65+
Our releases are automatic. They happen whenever code lands into `master`. A
66+
travis build gets kicked off and if it's successful, a tool called
67+
[`semantic-release`](https://github.com/semantic-release/semantic-release) is
68+
used to automatically publish a new release to npm as well as a changelog to
69+
GitHub. It is only able to determine the version and whether a release is
70+
necessary by the git commit messages. With this in mind, **please brush up on
71+
[the commit message convention][commit] which drives our releases.**
6772

68-
> One important note about this: Please make sure that commit messages do NOT contain the words
69-
> "BREAKING CHANGE" in them unless we want to push a major version. I've been burned by this
70-
> more than once where someone will include "BREAKING CHANGE: None" and it will end up releasing
71-
> a new major version. Not a huge deal honestly, but kind of annoying...
73+
> One important note about this: Please make sure that commit messages do NOT
74+
> contain the words "BREAKING CHANGE" in them unless we want to push a major
75+
> version. I've been burned by this more than once where someone will include
76+
> "BREAKING CHANGE: None" and it will end up releasing a new major version. Not
77+
> a huge deal honestly, but kind of annoying...
7278
7379
## Thanks!
7480

7581
Thank you so much for helping to maintain this project!
7682

77-
[commit]: https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
83+
[commit]:
84+
https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md

other/manual-releases.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
88

9-
This project has an automated release set up. So things are only released when there are
10-
useful changes in the code that justify a release. But sometimes things get messed up one way or another
11-
and we need to trigger the release ourselves. When this happens, simply bump the number below and commit
12-
that with the following commit message based on your needs:
9+
This project has an automated release set up. So things are only released when
10+
there are useful changes in the code that justify a release. But sometimes
11+
things get messed up one way or another and we need to trigger the release
12+
ourselves. When this happens, simply bump the number below and commit that with
13+
the following commit message based on your needs:
1314

1415
**Major**
1516

src/__tests__/index.js

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
import path from 'path';
2-
import slash from 'slash';
3-
import cases from 'jest-in-case';
4-
import { unquoteSerializer } from '../scripts/__tests__/helpers/serializers';
1+
import path from 'path'
2+
import slash from 'slash'
3+
import cases from 'jest-in-case'
4+
import {unquoteSerializer} from '../scripts/__tests__/helpers/serializers'
55

6-
const projectRoot = path.join(__dirname, '../../');
6+
const projectRoot = path.join(__dirname, '../../')
77

8-
expect.addSnapshotSerializer(unquoteSerializer);
8+
expect.addSnapshotSerializer(unquoteSerializer)
99
expect.addSnapshotSerializer({
1010
print: val => slash(val.replace(projectRoot, '<PROJECT_ROOT>/')),
1111
test: val => typeof val === 'string' && val.includes(projectRoot),
12-
});
12+
})
1313

1414
cases(
1515
'format',
16-
({ snapshotLog = false, throws = false, signal = false, args = [] }) => {
16+
({snapshotLog = false, throws = false, signal = false, args = []}) => {
1717
// beforeEach
18-
const { sync: crossSpawnSyncMock } = require('cross-spawn');
19-
const originalExit = process.exit;
20-
const originalArgv = process.argv;
21-
const originalLog = console.log;
22-
process.exit = jest.fn();
23-
console.log = jest.fn();
18+
const {sync: crossSpawnSyncMock} = require('cross-spawn')
19+
const originalExit = process.exit
20+
const originalArgv = process.argv
21+
const originalLog = console.log
22+
process.exit = jest.fn()
23+
console.log = jest.fn()
2424
try {
2525
// tests
26-
process.argv = ['node', '../', ...args];
27-
crossSpawnSyncMock.mockClear();
26+
process.argv = ['node', '../', ...args]
27+
crossSpawnSyncMock.mockClear()
2828
if (signal) {
29-
crossSpawnSyncMock.mockReturnValueOnce({ result: 1, signal });
29+
crossSpawnSyncMock.mockReturnValueOnce({result: 1, signal})
3030
}
31-
require('../');
31+
require('../')
3232
if (snapshotLog) {
33-
expect(console.log.mock.calls).toMatchSnapshot();
33+
expect(console.log.mock.calls).toMatchSnapshot()
3434
} else if (signal) {
35-
expect(process.exit).toHaveBeenCalledTimes(1);
36-
expect(process.exit).toHaveBeenCalledWith(1);
37-
expect(console.log.mock.calls).toMatchSnapshot();
35+
expect(process.exit).toHaveBeenCalledTimes(1)
36+
expect(process.exit).toHaveBeenCalledWith(1)
37+
expect(console.log.mock.calls).toMatchSnapshot()
3838
} else {
39-
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1);
40-
const [firstCall] = crossSpawnSyncMock.mock.calls;
41-
const [script, calledArgs] = firstCall;
42-
expect([script, ...calledArgs].join(' ')).toMatchSnapshot();
39+
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1)
40+
const [firstCall] = crossSpawnSyncMock.mock.calls
41+
const [script, calledArgs] = firstCall
42+
expect([script, ...calledArgs].join(' ')).toMatchSnapshot()
4343
}
4444
} catch (error) {
4545
if (throws) {
46-
expect(error.message).toMatchSnapshot();
46+
expect(error.message).toMatchSnapshot()
4747
} else {
48-
throw error;
48+
throw error
4949
}
5050
} finally {
5151
// afterEach
52-
process.exit = originalExit;
53-
process.argv = originalArgv;
54-
console.log = originalLog;
55-
jest.resetModules();
52+
process.exit = originalExit
53+
process.argv = originalArgv
54+
console.log = originalLog
55+
jest.resetModules()
5656
}
5757
},
5858
{
@@ -82,6 +82,6 @@ cases(
8282
signal: 'SIGBREAK',
8383
},
8484
},
85-
);
85+
)
8686

8787
/* eslint complexity:0 */

0 commit comments

Comments
 (0)