Skip to content

Commit 940d9d0

Browse files
committed
chore: prettier
1 parent ff79d0d commit 940d9d0

14 files changed

+446
-348
lines changed

Diff for: .eslintrc.js

+23-24
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
module.exports = {
22
root: true,
3-
ignorePatterns: [
4-
'cli/',
5-
'theme/',
6-
],
3+
ignorePatterns: ['cli/', '.cache/', 'public/'],
74
extends: [
8-
'@npmcli',
95
'eslint:recommended',
106
'plugin:react/recommended',
117
'plugin:github/react',
@@ -17,26 +13,29 @@ module.exports = {
1713
version: 'detect',
1814
},
1915
},
20-
overrides: [{
21-
files: ['src/**'],
22-
parserOptions: {
23-
ecmaFeatures: {
24-
jsx: true,
16+
overrides: [
17+
{
18+
files: ['src/**'],
19+
parserOptions: {
20+
ecmaFeatures: {
21+
jsx: true,
22+
},
23+
},
24+
env: {
25+
commonjs: true,
26+
es2022: true,
27+
browser: true,
28+
node: false,
29+
},
30+
rules: {
31+
'max-len': 'off',
2532
},
2633
},
27-
env: {
28-
commonjs: true,
29-
es2022: true,
30-
browser: true,
31-
node: false,
32-
},
33-
rules: {
34-
'max-len': 'off',
35-
},
36-
}, {
37-
files: ['src/shared.js'],
38-
rules: {
39-
'react/no-unescaped-entities': 'off',
34+
{
35+
files: ['src/shared.js'],
36+
rules: {
37+
'react/no-unescaped-entities': 'off',
38+
},
4039
},
41-
}],
40+
],
4241
}

Diff for: .prettierIgnore

-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
**/template-oss/*.json
22
**/template-oss/*.yml
33
content/
4-
content-debug/
54
cli/
65
.github/
76
package-lock.json
8-
CODE_OF_CONDUCT.md
9-
CONTENT-MODEL.md
107
SECURITY.md

Diff for: CODE_OF_CONDUCT.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div
1010

1111
Examples of behavior that contributes to a positive environment for our community include:
1212

13-
* Demonstrating empathy and kindness toward other people
14-
* Being respectful of differing opinions, viewpoints, and experiences
15-
* Giving and gracefully accepting constructive feedback
16-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17-
* Focusing on what is best not just for us as individuals, but for the overall community
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
1818

1919
Examples of unacceptable behavior include:
2020

21-
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22-
* Trolling, insulting or derogatory comments, and personal or political attacks
23-
* Public or private harassment
24-
* Publishing others' private information, such as a physical or email address, without their explicit permission
25-
* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission
26-
* Other conduct which could reasonably be considered inappropriate in a professional setting
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2727

2828
## Enforcement Responsibilities
2929

@@ -65,7 +65,7 @@ Community leaders will follow these Community Impact Guidelines in determining t
6565

6666
### 4. Permanent Ban
6767

68-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
6969

7070
**Consequence**: A permanent ban from any sort of public interaction within the community.
7171

@@ -78,4 +78,3 @@ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcem
7878
[homepage]: https://www.contributor-covenant.org
7979

8080
For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
81-

Diff for: CONTENT-MODEL.md

+49-36
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,103 @@
11
# Content model
2+
23
## Introduction
3-
This content model explains the goals of content in the npm docs, and what to include when you're writing or updating an article. We use a model to ensure that our content consistently, clearly, and comprehensively communicates what people need to achieve their goals with npm.
4-
Following a content model creates consistency that helps users and maintainers of the docs.
4+
5+
This content model explains the goals of content in the npm docs, and what to include when you're writing or updating an article. We use a model to ensure that our content consistently, clearly, and comprehensively communicates what people need to achieve their goals with npm. Following a content model creates consistency that helps users and maintainers of the docs.
56

67
For style questions, default to https://github.com/github/docs-internal/blob/main/contributing/content-style-guide.md
78

89
## Content structure
10+
911
Docs are grouped by topic.
10-
* Top-level doc set (Example: https://docs.npmjs.com/packages-and-modules)
11-
* Categories (Example: https://docs.npmjs.com/packages-and-modules/introduction-to-packages-and-modules)
12-
* Articles (Example: https://docs.npmjs.com/about-packages-and-modules)
12+
13+
- Top-level doc set (Example: https://docs.npmjs.com/packages-and-modules)
14+
- Categories (Example: https://docs.npmjs.com/packages-and-modules/introduction-to-packages-and-modules)
15+
- Articles (Example: https://docs.npmjs.com/about-packages-and-modules)
1316

1417
### Categories
18+
1519
Categories are organized around a feature or a discrete set of tasks. Use titles that are task-based and describe the purpose or goal of the category.
1620

1721
### Articles
22+
1823
Articles are the basic unit of content for the docs. Use titles that are clear, descriptive, and specific, with the same terminology as the product itself. All articles follow the same content order.
1924

2025
#### Content order
26+
2127
Introduce content from the broadest applicability to the most specific, following this order:
2228

23-
* Conceptual content
24-
* Procedural content for enabling a feature or setting
25-
* Procedural content on using a feature
26-
* Procedural content on managing a feature or setting
27-
* Procedural content on disabling a feature or setting
28-
* Procedural content on destructive actions (e.g. deletion)
29-
* Troubleshooting information
29+
- Conceptual content
30+
- Procedural content for enabling a feature or setting
31+
- Procedural content on using a feature
32+
- Procedural content on managing a feature or setting
33+
- Procedural content on disabling a feature or setting
34+
- Procedural content on destructive actions (e.g. deletion)
35+
- Troubleshooting information
3036

3137
Articles answer, “What is it? Why do it?” and then “How does someone do it?”
3238

3339
#### Content types
3440

3541
**Conceptual**
3642

37-
Conceptual content helps people understand a feature or topic by providing a clear, high-level overview, explanation of how the feature or topic can help them on their journey, and context like use cases or examples. Conceptual content is clear enough for a novice audience but also includes relevant information for advanced users. People most often use conceptual content when they're learning.
38-
If people need certain permissions to do a task described in the article, include a permissions statement describing who can do the task in the conceptual information.
43+
Conceptual content helps people understand a feature or topic by providing a clear, high-level overview, explanation of how the feature or topic can help them on their journey, and context like use cases or examples. Conceptual content is clear enough for a novice audience but also includes relevant information for advanced users. People most often use conceptual content when they're learning. If people need certain permissions to do a task described in the article, include a permissions statement describing who can do the task in the conceptual information.
3944

4045
How to write conceptual content
41-
* If people need specific permissions to do what is described in the article, list those required permissions
42-
* Describe in plain language what the feature, setting, or topic is
43-
* Describe its purpose and why it’s useful to the reader
44-
* Share use cases or examples
45-
* If relevant, describe how the feature or topic works
46-
* Highlight any details the reader needs to know to use the feature
47-
* Include next steps for getting started with the feature (whether through further reading links or content within the article itself)
46+
47+
- If people need specific permissions to do what is described in the article, list those required permissions
48+
- Describe in plain language what the feature, setting, or topic is
49+
- Describe its purpose and why it’s useful to the reader
50+
- Share use cases or examples
51+
- If relevant, describe how the feature or topic works
52+
- Highlight any details the reader needs to know to use the feature
53+
- Include next steps for getting started with the feature (whether through further reading links or content within the article itself)
4854

4955
**Procedural**
5056

5157
Procedural content helps people complete a task from start to finish while they're using npm. Procedural content gives context on how the task fits into someone's larger journey. If a procedure has prerequisites, include them before the procedural content.
5258

5359
How to write procedural content
54-
* Group multiple related procedures into a single article unless there's a reason not to
55-
* Use ordered lists for procedural steps
56-
* If a step is optional, indicate that first
57-
* Tell readers the expected outcome of any procedures
58-
* Include troubleshooting tips as frequently as possible
60+
61+
- Group multiple related procedures into a single article unless there's a reason not to
62+
- Use ordered lists for procedural steps
63+
- If a step is optional, indicate that first
64+
- Tell readers the expected outcome of any procedures
65+
- Include troubleshooting tips as frequently as possible
5966

6067
How to write prerequisites
61-
* Put the prerequisites immediately before the procedure that they are relevant to. If the prerequisites are relevant to all the procedures in an article, put them after the conceptual content and before the first procedure
62-
* You can use a list, a sentence, or a paragraph to explain prerequisites
63-
* You can also use a separate prerequisites section when:
64-
* The prerequisite information is very important and should not be missed
65-
* There is more than one prerequisite
68+
69+
- Put the prerequisites immediately before the procedure that they are relevant to. If the prerequisites are relevant to all the procedures in an article, put them after the conceptual content and before the first procedure
70+
- You can use a list, a sentence, or a paragraph to explain prerequisites
71+
- You can also use a separate prerequisites section when:
72+
- The prerequisite information is very important and should not be missed
73+
- There is more than one prerequisite
6674

6775
#### Contents of an article
68-
* Title
69-
* Conceptual content
70-
* Prerequisites (if applicable)
71-
* Procedural content
72-
* Troubleshooting (if applicable)
76+
77+
- Title
78+
- Conceptual content
79+
- Prerequisites (if applicable)
80+
- Procedural content
81+
- Troubleshooting (if applicable)
7382

7483
## User and job stories
84+
7585
When planning content, you can create user and job stories to define acceptance criteria that help determine if an article is helping users accomplish their goals.
7686

7787
### User stories
88+
7889
Create user stories to better understand each audience when a feature affects more than one audience.
7990

8091
As a [person in a particular role], I want to [perform an action or find something out], so that I can [achieve my goal of...].
8192

8293
### Job stories
94+
8395
Job stories are narrow, granular, and useful for targeted actions or specific tasks that a single audience wants to achieve.
8496

8597
When [there's a particular situation], I want to [perform an action or find something out], so that I can [achieve my goal of...].
8698

8799
### Acceptance criteria
100+
88101
Acceptance criteria explain the specific ways we'll know when a user or job story is considered complete. To define acceptance criteria, identify what an article has to offer someone for them to complete their desired task and feel satisfied.
89102

90103
## Article template

0 commit comments

Comments
 (0)