Skip to content

Commit d4d1b29

Browse files
authored
Prettier base config and NPM scripts in preparation for CI integration (#2286)
1 parent 83635e0 commit d4d1b29

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

.prettierignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Base
2+
3+
/.netlify
4+
/.vscode
5+
/content-modules
6+
/iconography
7+
/layouts
8+
package-lock.json
9+
/public
10+
/themes
11+
/tmp
12+
13+
# Temporary while we ramp up use of Prettier
14+
15+
/.github
16+
/archetypes
17+
/assets
18+
/content
19+
/data
20+
/resources
21+
/scripts
22+
/static
23+
/templates

CONTRIBUTING.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ request an enhancement, [create an issue][new-issue].
107107
## Submitting a change
108108

109109
Enhancements and fixes to the website are most welcome! Before submitting a
110-
[pull request][PR] (PR) over the website, run `npm run test` and address any
110+
[pull request][pr] (PR) over the website, run `npm run test` and address any
111111
reported issues.
112112

113113
### Submodule changes
@@ -153,12 +153,14 @@ required.
153153
[hugo]: https://gohugo.io
154154
[localhost:8888]: http://localhost:8888
155155
[netlify]: https://netlify.com
156-
[new-issue]: https://github.com/open-telemetry/opentelemetry.io/issues/new/choose
156+
[new-issue]:
157+
https://github.com/open-telemetry/opentelemetry.io/issues/new/choose
157158
[nodejs-rel]: https://nodejs.org/en/about/releases/
158159
[nodejs-win]:
159160
https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows
160161
[nvm]:
161162
https://github.com/nvm-sh/nvm/blob/master/README.md#installing-and-updating
162163
[nvm-windows]: https://github.com/coreybutler/nvm-windows
163164
[org]: https://github.com/open-telemetry
164-
[pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
165+
[pr]:
166+
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ If your post will have images or other assets, instead run:
4747
npx hugo new content/en/blog/2023/short-name-for-post/index.md
4848
```
4949

50-
Edit the markdown file at the path you provided in the previous
51-
command. The file is initialized from the blog-post starter under
52-
[archetypes](archetypes).
50+
Edit the markdown file at the path you provided in the previous command. The
51+
file is initialized from the blog-post starter under [archetypes](archetypes).
5352

5453
Put assets, if any, like images into the folder created.
5554

hugo.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ outputs:
4040
home: [HTML, REDIRECTS, RSS]
4141

4242
params:
43-
copyright: 'The OpenTelemetry Authors | Documentation Distributed under CC BY 4.0 | '
43+
copyright: >-
44+
The OpenTelemetry Authors | Documentation Distributed under CC BY 4.0 |
4445
tagline: Effective observability requires high-quality telemetry
4546
sub_tagline: >-
4647
**OpenTelemetry** makes robust, portable telemetry a built-in feature of
@@ -108,7 +109,7 @@ params:
108109
url: https://github.com/open-telemetry
109110
icon: fab fa-github
110111
desc: Find us on GitHub.
111-
- name: 'Slack #opentelemetry'
112+
- name: "Slack #opentelemetry"
112113
url: https://cloud-native.slack.com/archives/CJFCJHG4Q
113114
icon: fab fa-slack
114115
desc: >-
@@ -159,7 +160,7 @@ params:
159160

160161
fonts:
161162
- name: Noto Sans
162-
sizes: [300,400,600,700]
163+
sizes: [300, 400, 600, 700]
163164
type: sans_serif
164165

165166
services:

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"precheck-links": "npm run build",
3636
"prepare": "run-s get:submodule _prepare:docsy",
3737
"preserve:hugo": "npm run _prebuild",
38+
"prettier:check-all": "npx prettier --check .",
39+
"prettier:no-ignore": "npx prettier --ignore-path ''",
3840
"preserve": "npm run _prebuild",
3941
"s": "run-s",
4042
"schemas:update": "npm run update:submodule content-modules/opentelemetry-specification",

0 commit comments

Comments
 (0)