You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/03-code-quality/02-coding-style/article.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,9 @@ Now let's discuss the rules and reasons for them in detail.
40
40
41
41
Nothing is "carved in stone" here. Everything is optional and can be changed: these are coding rules, not religious dogmas.
42
42
43
-
### Figure brackets
43
+
### Curly braces
44
44
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.
46
46
47
47
Like this:
48
48
@@ -293,7 +293,7 @@ Most linters are integrated with editors: just enable the plugin in the editor a
293
293
For instance, for ESLint you should do the following:
294
294
295
295
1. Install [Node.JS](https://nodejs.org/).
296
-
2. Install ESLint with the command `npm install -g eslint` (npm is Node.JSpackage installer).
296
+
2. Install ESLint with the command `npm install -g eslint` (npm is a JavaScriptpackage installer).
297
297
3. Create a config file named `.eslintrc`in the root of your JavaScript project (in the folder that contains all your files).
298
298
299
299
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
329
329
330
330
All syntax rules from this chapter and the style guides aim to increase readability, so all of them are debatable.
331
331
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.
333
333
334
334
Read style guides to see the latest ideas about that and follow those that you find the best.
0 commit comments