Skip to content

Commit 7269c7c

Browse files
committed
Update guidelines for guidelines
There are a couple of issues with the "meta-guidelines": 1. Currently, if you want to assign a guideline to a category, you must use an emoji in the guideline header. There are two problems with emoji: they are difficult to work with — try selecting one in your editor! — and, like icons, they can mean different things to different people. 2. Originally we borrowed the concept of guideline categories from the Redux Style Guide. This guide lists three of them: Essential, Strongly Recommended (renamed to "Recommended" here), and Recommended (renamed to "Suggested"). However, there is not a clear delineation between these categories — when do you know whether to assign something as Recommended vs. Essential? — and anyway, we've only used the first and third categories so far. 3. The guideline that describes how to present a dichotomy — a non-recommended way to do something and a recommended way to do it — allowed for unclear wording. 4. The "be empowered" guideline isn't really a guideline, it's just a nice thing to say. And it really applies to the whole repo, not just the guidelines. To solve these issues: 1. I've simplified the concept of guideline categories. There are only two. All guidelines are essentially rules by default. If a guideline presents options for addressing a pain point, they can be called out by using an emoji. 2. I've simplified the instructions on how to give examples. 3. I've removed the "be empowered" guideline. I may add that to the root README and also explain how to propose new changes.
1 parent cf5fb97 commit 7269c7c

File tree

1 file changed

+25
-51
lines changed

1 file changed

+25
-51
lines changed

guides/guidelines.md

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,51 @@
11
# Guidelines for Writing Guidelines
22

3-
## 🙏 Use this document as a guide
3+
## Use this document as a guide
44

55
This document is not only a set of guidelines, but also a template for other guidelines documents.
66

7-
## 🙏 Communicate the importance of your guideline
8-
9-
Guidelines may differ in how closely they are intended to be followed. To designate the importance of a guideline, include an emoji in its header to assign it to one of three categories:
10-
11-
1. **🙏 (Standard):** These are guidelines that it really behooves everyone to follow. There shouldn't be a reason not to follow them, but anyone who feels that a guideline should be changed or removed should start a discussion in a pull request.
12-
2. **🌳 (Recommended):** These are guidelines that everyone ought to follow, though teams or projects may opt to bypass or change them if they have a good reason to do so.
13-
3. **💡 (Suggested):** These are guidelines that offer one way to solve a problem among multiple, equally valid alternatives. When you are writing such a guideline, enumerate these alternatives and suggest one of them for the reader to follow.
14-
15-
## 🙏 Be direct
7+
## Be direct
168

179
Guidelines should be as easy to understand and follow as possible. Think of each guideline like a commit: start with a concise summary, preferably a direct command, then use a paragraph or two to elaborate.
1810

19-
## 🙏 Be succinct
20-
21-
Remove extraneous language in both the guideline itself and the elaboration (see [*The Elements of Style*](https://www.gutenberg.org/files/37134/37134-h/37134-h.htm#Rule_13) for help).
11+
## Be succinct
2212

23-
## 🙏 Bolster your guideline if necessary
13+
Remove extraneous language in both the guideline itself and the elaboration.
2414

25-
If a discussion exists in Slack or GitHub which spawned your guideline, link to that discussion. Or, if a book, blog post, or related work exists which can help to shine light on your guideline's utility, link to the resource.
15+
## Bolster your guideline if necessary
2616

27-
Although not strictly necessary for arbitrary guidelines (which aim to solve problems with multiple, equal-advantage solutions) or for axiomatic guidelines (which abide by values assumed to be good over those assumed to be bad), including a context or rationale with your guideline is still helpful for onboarding.
17+
If a discussion exists in a public GitHub repository which provides context around a guideline, link to that discussion. Or, if a book, blog post, or related work exists which helps to explain the purpose of a guideline, link to the resource.
2818

29-
Here is an example:
19+
Use a "Read more" section to collect multiple resources:
3020

3121
``` markdown
32-
## Use snake-case to name files and directories.
22+
### Read more
3323

34-
[**View discussion on GitHub**](https://example.com).
24+
- [Link 1](https://example1.com)
25+
- [Link 2](https://example2.com)
26+
- [Link 3](https://example3.com)
3527
```
3628

37-
## 🙏 Provide examples
29+
## Provide examples
3830

39-
It is far easier to understand a principle not by reading about it, but by observing its effects.
31+
It is far easier to understand the purpose and effects of a guideline not by reading about it, but by observing an example.
4032

41-
A common way to provide an example is to offer a dichotomy: a passage of code which does not follow the guideline followed by a passage of code that does. Understanding that some decisions are arbitary, take care not to use language like "bad" or "good" which could be misread by others as a slight against them. Rather than assigning a grade to the code in question, tell the reader what to do.
33+
A common way to provide an example is to offer a dichotomy, a passage of code which falls outside the guideline followed by a passage of code that conforms to it. Understanding that some decisions are arbitrary, take care not to use language like "bad"/"good", "incorrect"/"correct", etc., which may sound judgmental. Rather than assigning a grade to the code in question, use emoji:
4234

43-
For instance, instead of this:
35+
🚫
4436

45-
~~~ markdown
46-
**Bad:**
37+
``` javascript
38+
const x = 42;
39+
```
4740

48-
``` javascript
49-
const x = 42;
50-
```
51-
52-
**Good:**
41+
5342

54-
``` javascript
55-
const THE_MEANING_OF_LIFE = 42;
56-
```
57-
~~~
43+
``` javascript
44+
const THE_MEANING_OF_LIFE = 42;
45+
```
5846

59-
say something like this:
60-
61-
~~~ markdown
62-
Instead of this:
63-
64-
``` javascript
65-
const x = 42;
66-
```
67-
68-
say this:
69-
70-
``` javascript
71-
const THE_MEANING_OF_LIFE = 42;
72-
```
73-
~~~
47+
## Mark guidelines with options accordingly
7448

75-
## 🙏 Be empowered to propose your ideas/suggestions
49+
By default, a guideline is intended to be followed unless there is a good reason not to do so.
7650

77-
The guidelines in this repository are not set in stone, and none of us is the gatekeeper. If you disagree with a guideline, or you notice a guideline that's missing, feel free to open a discussion in a pull request.
51+
Occasionally, however, a guideline may offer a set of options among which the reader may choose. To designate this type of guideline, prefix the header with 💡.

0 commit comments

Comments
 (0)