Skip to content

Commit c2dd1f6

Browse files
committed
chore: upgrade Prettier and run on full repo
- Move Prettier 1 -> to support `.` glob and built-in parsers - Move whitespace settings to EditorConfig that Prettier reads - Expand glob to run on all non-generated files
1 parent e954e15 commit c2dd1f6

28 files changed

+1502
-1456
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
* text=auto eol=lf
12
.licenses/** -diff linguist-generated=true

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Create a bug report
44
title: ''
55
labels: bug, needs triage
66
assignees: ''
7-
87
---
98

109
<!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 --->
@@ -17,15 +16,18 @@ A clear and concise description of what the bug is.
1716
Specify the action version
1817

1918
**Platform:**
19+
2020
- [ ] Ubuntu
2121
- [ ] macOS
2222
- [ ] Windows
2323

2424
**Runner type:**
25+
2526
- [ ] Hosted
2627
- [ ] Self-hosted
2728

2829
**Tools version:**
30+
2931
<!--- Please specify versions of node and package manager (npm, yarn, pnpm and etc)-->
3032

3133
**Repro steps:**

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
blank_issues_enabled: false
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: ''
55
labels: feature request, needs triage
66
assignees: ''
77
---
8+
89
<!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 --->
910
<!--- Before opening up a new feature request, please make sure to check for similar existing issues and pull requests -->
1011

@@ -15,4 +16,5 @@ Describe your proposal.
1516
Justification or a use case for your proposal.
1617

1718
**Are you willing to submit a PR?**
18-
<!--- We accept contributions! -->
19+
20+
<!--- We accept contributions! -->

.github/eslint-compact.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"problemMatcher": [
2+
"problemMatcher": [
3+
{
4+
"owner": "eslint-compact",
5+
"pattern": [
36
{
4-
"owner": "eslint-compact",
5-
"pattern": [
6-
{
7-
"regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$",
8-
"file": 1,
9-
"line": 2,
10-
"column": 3,
11-
"severity": 4,
12-
"message": 5,
13-
"code": 6
14-
}
15-
]
7+
"regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"severity": 4,
12+
"message": 5,
13+
"code": 6
1614
}
17-
]
15+
]
16+
}
17+
]
1818
}

.github/eslint-stylish.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"problemMatcher": [
2+
"problemMatcher": [
3+
{
4+
"owner": "eslint-stylish",
5+
"pattern": [
36
{
4-
"owner": "eslint-stylish",
5-
"pattern": [
6-
{
7-
"regexp": "^([^\\s].*)$",
8-
"file": 1
9-
},
10-
{
11-
"regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$",
12-
"line": 1,
13-
"column": 2,
14-
"severity": 3,
15-
"message": 4,
16-
"code": 5,
17-
"loop": true
18-
}
19-
]
7+
"regexp": "^([^\\s].*)$",
8+
"file": 1
9+
},
10+
{
11+
"regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$",
12+
"line": 1,
13+
"column": 2,
14+
"severity": 3,
15+
"message": 4,
16+
"code": 5,
17+
"loop": true
2018
}
21-
]
19+
]
20+
}
21+
]
2222
}

.github/pull_request_template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Describe your changes.
55
Add link to the related issue.
66

77
**Check list:**
8+
89
- [ ] Mark if documentation changes are required.
9-
- [ ] Mark if tests were added or updated to cover the changes.
10+
- [ ] Mark if tests were added or updated to cover the changes.

.github/tsc.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"problemMatcher": [
2+
"problemMatcher": [
3+
{
4+
"owner": "tsc",
5+
"pattern": [
36
{
4-
"owner": "tsc",
5-
"pattern": [
6-
{
7-
"regexp": "^([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+TS(\\d+)\\s*:\\s*(.*)$",
8-
"file": 1,
9-
"line": 2,
10-
"column": 3,
11-
"severity": 4,
12-
"code": 5,
13-
"message": 6
14-
}
15-
]
7+
"regexp": "^([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+TS(\\d+)\\s*:\\s*(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"severity": 4,
12+
"code": 5,
13+
"message": 6
1614
}
17-
]
15+
]
16+
}
17+
]
1818
}

.github/workflows/release-new-action-version.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
name: releaseNewActionVersion
2121
runs-on: ubuntu-latest
2222
steps:
23-
- name: Update the ${{ env.TAG_NAME }} tag
24-
uses: actions/publish-action@v0.1.0
25-
with:
26-
source-tag: ${{ env.TAG_NAME }}
27-
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
23+
- name: Update the ${{ env.TAG_NAME }} tag
24+
uses: actions/publish-action@v0.1.0
25+
with:
26+
source-tag: ${{ env.TAG_NAME }}
27+
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

.licensed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ allowed:
1212
- unlicense
1313

1414
reviewed:
15-
npm:
15+
npm:

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.licenses/
2+
dist/
3+
pnpm-lock.yaml

.prettierrc.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"printWidth": 80,
3-
"tabWidth": 2,
4-
"useTabs": false,
5-
"semi": true,
6-
"singleQuote": true,
7-
"trailingComma": "none",
8-
"bracketSpacing": false,
9-
"arrowParens": "avoid",
10-
"parser": "typescript"
11-
}
2+
"printWidth": 80,
3+
"semi": true,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"bracketSpacing": false,
7+
"arrowParens": "avoid"
8+
}

.vscode/launch.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"name": "Debug Jest Tests on Nix",
9-
"type": "node",
10-
"request": "launch",
11-
"runtimeArgs": [
12-
"--inspect-brk",
13-
"${workspaceRoot}/node_modules/.bin/jest",
14-
"--runInBand"
15-
],
16-
"console": "integratedTerminal",
17-
"internalConsoleOptions": "neverOpen",
18-
"port": 9229
19-
}
20-
]
21-
}
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug Jest Tests on Nix",
9+
"type": "node",
10+
"request": "launch",
11+
"runtimeArgs": [
12+
"--inspect-brk",
13+
"${workspaceRoot}/node_modules/.bin/jest",
14+
"--runInBand"
15+
],
16+
"console": "integratedTerminal",
17+
"internalConsoleOptions": "neverOpen",
18+
"port": 9229
19+
}
20+
]
21+
}

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
2626
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities
@@ -73,4 +73,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
7373
[homepage]: https://www.contributor-covenant.org
7474

7575
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
https://www.contributor-covenant.org/faq

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ See [action.yml](action.yml)
1919

2020
```yaml
2121
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: 16
26-
- run: npm ci
27-
- run: npm test
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 16
26+
- run: npm ci
27+
- run: npm test
2828
```
2929
3030
The `node-version` input is optional. If not supplied, the node version from PATH will be used. However, it is recommended to always specify Node.js version and don't rely on the system one.
@@ -39,10 +39,10 @@ The `node-version` input supports the Semantic Versioning Specification, for mor
3939

4040
Examples:
4141

42-
- Major versions: `14`, `16`, `18`
43-
- More specific versions: `10.15`, `16.15.1` , `18.4.0`
44-
- NVM LTS syntax: `lts/erbium`, `lts/fermium`, `lts/*`, `lts/-n`
45-
- Latest release: `*` or `latest`/`current`/`node`
42+
- Major versions: `14`, `16`, `18`
43+
- More specific versions: `10.15`, `16.15.1` , `18.4.0`
44+
- NVM LTS syntax: `lts/erbium`, `lts/fermium`, `lts/*`, `lts/-n`
45+
- Latest release: `*` or `latest`/`current`/`node`
4646

4747
**Note:** Like the other values, `*` will get the latest [locally-cached Node.js version](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#nodejs), or the latest version from [actions/node-versions](https://github.com/actions/node-versions/blob/main/versions-manifest.json), depending on the [`check-latest`](docs/advanced-usage.md#check-latest-version) input.
4848

@@ -68,27 +68,27 @@ See the examples of using cache for `yarn`/`pnpm` and `cache-dependency-path` in
6868

6969
```yaml
7070
steps:
71-
- uses: actions/checkout@v3
72-
- uses: actions/setup-node@v3
73-
with:
74-
node-version: 16
75-
cache: 'npm'
76-
- run: npm ci
77-
- run: npm test
71+
- uses: actions/checkout@v3
72+
- uses: actions/setup-node@v3
73+
with:
74+
node-version: 16
75+
cache: 'npm'
76+
- run: npm ci
77+
- run: npm test
7878
```
7979

8080
**Caching npm dependencies in monorepos:**
8181

8282
```yaml
8383
steps:
84-
- uses: actions/checkout@v3
85-
- uses: actions/setup-node@v3
86-
with:
87-
node-version: 16
88-
cache: 'npm'
89-
cache-dependency-path: subdir/package-lock.json
90-
- run: npm ci
91-
- run: npm test
84+
- uses: actions/checkout@v3
85+
- uses: actions/setup-node@v3
86+
with:
87+
node-version: 16
88+
cache: 'npm'
89+
cache-dependency-path: subdir/package-lock.json
90+
- run: npm ci
91+
- run: npm test
9292
```
9393

9494
## Matrix Testing
@@ -99,7 +99,7 @@ jobs:
9999
runs-on: ubuntu-latest
100100
strategy:
101101
matrix:
102-
node: [ 14, 16, 18 ]
102+
node: [14, 16, 18]
103103
name: Node ${{ matrix.node }} sample
104104
steps:
105105
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)