Skip to content

Commit

Permalink
fix: remark-lint prohibited-strings (nodejs#348)
Browse files Browse the repository at this point in the history
- Github -> GitHub
- Javascript -> JavaScript
- Delete "Note that"
- node.js -> Node.js
  • Loading branch information
nschonni authored and MylesBorins committed Oct 18, 2019
1 parent 7794efb commit ca470cf
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .remarkrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
["remark-lint-no-multiple-toplevel-headings", false],
["remark-lint-no-tabs", false],
["remark-lint-no-trailing-spaces", false],
["remark-lint-prohibited-strings", false],
["remark-lint-unordered-list-marker-style", false]
]
}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The [Node.js Code of Conduct][] applies to this repo.

[node.js code of conduct]:
[Node.js code of conduct]:
https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
2 changes: 1 addition & 1 deletion ModerationPolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The [Node.js Moderation Policy][] applies to this repo.

[node.js moderation policy]:
[Node.js moderation policy]:
https://github.com/nodejs/admin/blob/master/Moderation-Policy.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje
## 📝 Data Sources
This repository contains no documentation content. Content is pulled from across the Node.js Github Org, Contentful, and other data sources and stitched together into a cohesive website.
This repository contains no documentation content. Content is pulled from across the Node.js GitHub Org, Contentful, and other data sources and stitched together into a cohesive website.
### src/documentation
Expand Down
2 changes: 1 addition & 1 deletion meetings/2018-04-26.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Dropped / punted for now.
- Two options here: Funds through the foundation for hiring a design firm, or community submissions.
- Two-pronged approach, we will start the public call for designers now and also begin the process of requesting funds now as a backup (ETA ~3mo if needed)
- Put the infrastructure in place to handle the influx of design submissions
- Make this call available outside of Github
- Make this call available outside of GitHub
- Make Call for Proposals ready to launch by date of the Collab Summit. Launch at Collab Summit

#### Tech Exploration for In-Browser Node Playground [#12](https://github.com/nodejs/website-redesign/issues/12)
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/0002-node-history/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In this post, we draw the big picture of Node.js in its history, to put things i

JavaScript is a programming language that was created at Netscape as a scripting tool to manipulate web pages inside their browser, [Netscape Navigator](https://en.wikipedia.org/wiki/Netscape_Navigator).

Part of the business model of Netscape was to sell Web Servers, which included an environment called _Netscape LiveWire_ that could create dynamic pages using server-side JavaScript. Unfortunately, _Netscape LiveWire_ wasn't very successful and server-side Javascript wasn't popularized until recently, by the introduction of Node.js.
Part of the business model of Netscape was to sell Web Servers, which included an environment called _Netscape LiveWire_ that could create dynamic pages using server-side JavaScript. Unfortunately, _Netscape LiveWire_ wasn't very successful and server-side JavaScript wasn't popularized until recently, by the introduction of Node.js.

One key factor that led to the rise of Node.js was the timing. Just a few years earlier, JavaScript had started to be considered as a more serious language, thanks to "Web 2.0" applications (such as Flickr, Gmail, etc.) that showed the world what a modern experience on the web could be like.

Expand Down
6 changes: 3 additions & 3 deletions src/documentation/0034-javascript-promises/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ const isItDoneYet = new Promise((resolve, reject) => {
})
```

As you can see, the promise checks the `done` global constant, and if that's true, the promise goes to a **resolved** state (since the `resolve` callback was called); otherwise, the `reject` callback is executed, putting the promise in a rejected state. (Note that if one of these functions is never called in the execution path, the promise will remain in a pending state)
As you can see, the promise checks the `done` global constant, and if that's true, the promise goes to a **resolved** state (since the `resolve` callback was called); otherwise, the `reject` callback is executed, putting the promise in a rejected state. (If one of these functions is never called in the execution path, the promise will remain in a pending state)

Using `resolve` and `reject`, we can communicate back to the caller what the resulting promise state was, and what to do with it. In the above case we just returned a string, but it could be an object, or `null` as well. Because we've created the promise in the above snippet, it has **already started executing**. This is important to understand what's going on in the section [Consuming a promise](#consuming-a-promise) below.

A more common example you may come across is a technique called **Promisifying**. This technique is a way to be able to use a classic javascript function that takes a callback, and have it return a promise:
A more common example you may come across is a technique called **Promisifying**. This technique is a way to be able to use a classic JavaScript function that takes a callback, and have it return a promise:

```js
const fs = require('fs')
Expand All @@ -84,7 +84,7 @@ getFile('/etc/passwd')
.catch(err => console.error(err))
```

> note that in recent versions of node.js, you won't have to do this manual conversion for a lot of the API. There is a promisifying function available in the [util module](https://nodejs.org/docs/latest-v11.x/api/util.html#util_util_promisify_original) that will do this for you, given that the function you're promisifying has the correct signature.
> In recent versions of Node.js, you won't have to do this manual conversion for a lot of the API. There is a promisifying function available in the [util module](https://nodejs.org/docs/latest-v11.x/api/util.html#util_util_promisify_original) that will do this for you, given that the function you're promisifying has the correct signature.
---

## Consuming a promise
Expand Down
2 changes: 1 addition & 1 deletion style-guide/0001-voice-and-tone.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ to be personal and inviting. To achieve this, we may address our reader like
a friend.

We might say: _"You're welcome to chat with us about Node.js core features on our
Github issues list!"_
GitHub issues list!"_

Instead of: _"The GitHub issues list is the place for discussion of Node.js core
features."_
Expand Down

0 comments on commit ca470cf

Please sign in to comment.