Skip to content

Commit b22bfa4

Browse files
authored
Merge pull request #1271 from pichfl/mainmatter/prettier
Use Prettier
2 parents 8e4384c + 5759ce1 commit b22bfa4

File tree

81 files changed

+1828
-1700
lines changed

Some content is hidden

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

81 files changed

+1828
-1700
lines changed

.eslintrc.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ module.exports = {
88
env: {
99
es6: true
1010
},
11-
extends: [
12-
'sane-node'
13-
],
11+
extends: ['sane-node', 'prettier'],
1412
overrides: [
1513
{
1614
files: ['bin/**/*.js'],
@@ -19,18 +17,12 @@ module.exports = {
1917
}
2018
},
2119
{
22-
files: [
23-
'test/**/*-test.js'
24-
],
20+
files: ['test/**/*-test.js'],
2521
env: {
2622
mocha: true
2723
},
28-
plugins: [
29-
'mocha'
30-
],
31-
extends: [
32-
'plugin:mocha/recommended'
33-
],
24+
plugins: ['mocha'],
25+
extends: ['plugin:mocha/recommended'],
3426
rules: {
3527
'mocha/no-exclusive-tests': 'error',
3628
'mocha/no-empty-description': 'off',

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
If you are submitting a bug report, please run your command with the debug flag:
22

3-
* Unix (global): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update ...`
4-
* Windows (global): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update ...`
5-
* Unix (command): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update ...`
6-
* Windows (command): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update ...`
3+
- Unix (global): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update ...`
4+
- Windows (global): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update ...`
5+
- Unix (command): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update ...`
6+
- Windows (command): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update ...`
77

88
and post the console output in the block below:
99

.github/workflows/publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: 20
16-
registry-url: 'https://registry.npmjs.org'
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
registry-url: 'https://registry.npmjs.org'
1717

18-
- run: npm publish
19-
env:
20-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
- run: npm publish
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test/fixtures/**
2+
pnpm-lock.yaml
3+
CHANGELOG.md

.vscode/launch.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,15 @@
1818
"env": {
1919
"DEBUG": "ember-cli-update,boilerplate-update,git-diff-apply"
2020
},
21-
"skipFiles": [
22-
"<node_internals>/**"
23-
],
21+
"skipFiles": ["<node_internals>/**"],
2422
"outputCapture": "std"
2523
},
2624
{
2725
"type": "node",
2826
"request": "attach",
2927
"name": "Attach",
3028
"port": 9229,
31-
"skipFiles": [
32-
"<node_internals>/**"
33-
]
29+
"skipFiles": ["<node_internals>/**"]
3430
}
3531
]
3632
}

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Update [Ember CLI](https://ember-cli.com/) projects
1010

1111
The 2 use cases are:
12+
1213
1. Updating a project's boilerplate code from an older Ember version to a newer one like 3.4.0 to 3.20.0 for example. These are called base blueprints and there are 3 types officially provided by ember-cli: `app`, `addon`, and `glimmer`.
1314
- This is different from the existing `ember init` command. That command tries to reset your project back to a brand new project. It removes all your changes and additions.
1415
2. Updating boilerplate code for a blueprint from an Ember addon from an older version to a newer one. These are called custom blueprints.
@@ -315,8 +316,8 @@ And then you're done! You have a freshly updated app (or addon). As noted, you c
315316

316317
Need help using `git mergetool`? Here are some starting points:
317318

318-
* https://git-scm.com/docs/git-mergetool
319-
* https://gist.github.com/karenyyng/f19ff75c60f18b4b8149
319+
- https://git-scm.com/docs/git-mergetool
320+
- https://gist.github.com/karenyyng/f19ff75c60f18b4b8149
320321

321322
If you made a mistake during the update/conflict resolution, run these commands to undo everything and get you back to before the update:
322323

@@ -335,9 +336,9 @@ If you run into an error like `error: unrecognized input`, you may need to updat
335336

336337
If you are getting an error or unexpected results, running the command with the debug flag:
337338

338-
* Unix (global):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update`
339-
* Windows (global):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update`
340-
* Unix (command):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update`
341-
* Windows (command):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update`
339+
- Unix (global):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update`
340+
- Windows (global):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update`
341+
- Unix (command):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update`
342+
- Windows (command):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update`
342343

343344
will give you more detailed logging.

RELEASE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ guiding principle here is that changelogs are for humans, not machines.
1717

1818
When reviewing merged PR's the labels to be used are:
1919

20-
* breaking - Used when the PR is considered a breaking change.
21-
* enhancement - Used when the PR adds a new feature or enhancement.
22-
* bug - Used when the PR fixes a bug included in a previous release.
23-
* documentation - Used when the PR adds or updates documentation.
24-
* internal - Used for internal changes that still require a mention in the
20+
- breaking - Used when the PR is considered a breaking change.
21+
- enhancement - Used when the PR adds a new feature or enhancement.
22+
- bug - Used when the PR fixes a bug included in a previous release.
23+
- documentation - Used when the PR adds or updates documentation.
24+
- internal - Used for internal changes that still require a mention in the
2525
changelog/release notes.
2626

2727
## Release
2828

2929
Once the prep work is completed, the actual release is straight forward:
3030

31-
* First, ensure that you have installed your projects dependencies:
31+
- First, ensure that you have installed your projects dependencies:
3232

3333
```sh
3434
npm install
3535
```
3636

37-
* Second, ensure that you have obtained a
37+
- Second, ensure that you have obtained a
3838
[GitHub personal access token][generate-token] with the `repo` scope (no
3939
other permissions are needed). Make sure the token is available as the
4040
`GITHUB_AUTH` environment variable.
@@ -47,7 +47,7 @@ npm install
4747

4848
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
4949

50-
* And last (but not least 😁) do your release.
50+
- And last (but not least 😁) do your release.
5151

5252
```sh
5353
npx release-it

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
environment:
22
matrix:
3-
- nodejs_version: "14"
4-
DEBUG: "ember-cli-update,boilerplate-update,git-diff-apply"
3+
- nodejs_version: '14'
4+
DEBUG: 'ember-cli-update,boilerplate-update,git-diff-apply'
55

66
branches:
77
only:

bin/ember-cli-update.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
#!/usr/bin/env node
22
'use strict';
33

4-
require('yargs')
5-
.commandDir('commands')
6-
.parserConfiguration({
7-
'populate--': true,
8-
'unknown-options-as-args': true
9-
})
10-
.argv;
4+
require('yargs').commandDir('commands').parserConfiguration({
5+
'populate--': true,
6+
'unknown-options-as-args': true
7+
}).argv;
118

129
// Displays a message on the terminal if a new version of the package is available.
1310
const updateNotifier = require('update-notifier');

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"src"
2727
],
2828
"scripts": {
29-
"lint": "eslint . --ext js,json",
29+
"lint": "eslint . --ext js,json && prettier --check .",
30+
"lint:fix": "eslint . --ext js,json --fix && prettier --write .",
3031
"start": "node bin/ember-cli-update",
3132
"test": "mocha",
3233
"test:bin": "mocha --config .mocharc.bin.js",
@@ -56,6 +57,7 @@
5657
"chai-string": "^1.5.0",
5758
"ember-cli": "3.16.0",
5859
"eslint": "^8.16.0",
60+
"eslint-config-prettier": "^10.1.8",
5961
"eslint-config-sane": "^1.0.2",
6062
"eslint-config-sane-node": "^1.1.1",
6163
"eslint-plugin-json-files": "^1.3.0",
@@ -66,6 +68,7 @@
6668
"git-fixtures": "^6.0.0",
6769
"mocha": "^10.0.0",
6870
"mocha-helpers": "^6.2.1",
71+
"prettier": "^3.6.2",
6972
"release-it": "^15.5.0",
7073
"renovate-config-standard": "2.1.2",
7174
"sinon": "^14.0.0",

0 commit comments

Comments
 (0)