Skip to content

Commit ef12c34

Browse files
authored
Merge pull request #374 from brentguf/coding-style
Coding style chapter
2 parents b4d49e6 + 31bc534 commit ef12c34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

1-js/03-code-quality/02-coding-style/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Now let's discuss the rules and reasons for them in detail.
4040

4141
Nothing is "carved in stone" here. Everything is optional and can be changed: these are coding rules, not religious dogmas.
4242

43-
### Figure brackets
43+
### Curly braces
4444

45-
In most JavaScript projects figure brackets are written on the same line, not on the new line. A so-called "egyptian" style. There's also a space before an opening bracket.
45+
In most JavaScript projects curly braces are written on the same line as the corresponding keyword, not on the new line, a so-called "Egyptian" style. There's also a space before an opening bracket.
4646

4747
Like this:
4848

@@ -293,7 +293,7 @@ Most linters are integrated with editors: just enable the plugin in the editor a
293293
For instance, for ESLint you should do the following:
294294

295295
1. Install [Node.JS](https://nodejs.org/).
296-
2. Install ESLint with the command `npm install -g eslint` (npm is Node.JS package installer).
296+
2. Install ESLint with the command `npm install -g eslint` (npm is a JavaScript package installer).
297297
3. Create a config file named `.eslintrc` in the root of your JavaScript project (in the folder that contains all your files).
298298

299299
Here's an example of `.eslintrc`:
@@ -329,6 +329,6 @@ Also certain IDEs support built-in linting, that also may be good, but not so tu
329329
330330
All syntax rules from this chapter and the style guides aim to increase readability, so all of them are debatable.
331331
332-
When we think about "how to write better?", the sole criterion is "what makes the code more readable and easier to understand? what helps to evade errors?" That's the main thing to keep in mind when choosing the style or discussing which one is better.
332+
When we think about "how to write better?", the sole criterion is "what makes the code more readable and easier to understand? what helps to avoid errors?" That's the main thing to keep in mind when choosing the style or discussing which one is better.
333333

334334
Read style guides to see the latest ideas about that and follow those that you find the best.

0 commit comments

Comments
 (0)