Skip to content

Commit ccfe81b

Browse files
committed
Merges JS and Javascript content
1 parent 80a2e11 commit ccfe81b

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Icalia Guides is the programming style used at [Icalia Labs](http://icalialabs.c
1616
* [Rails](stack/rails)
1717
* [Git](stack/git)
1818
* [Sass](stack/sass)
19-
* [Javascript](stack/js)
19+
* [Javascript](stack/javascript)
2020
* [Swift](stack/swift)
2121

2222

stack/javascript/README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
# Javascript Best Practices
22

3+
This is a guide to work with Javascript on IcaliaLabs projects.
4+
5+
## General Guidelines
6+
7+
When working with javascript try to follow this simple rules:
8+
9+
* Use camelcase for method/variable naming
10+
* Never use global variables
11+
* Encapsulate logic in classes, as they are easier to test. Use syntax transpiler for this, such as [babel](http://babeljs.io/).
12+
* Use underscore at the beginning for private methods naming
13+
* Prefer to isolate javascript code on individual files
14+
* Prefer not to use the script tag on HTML for inline javascript code
15+
316
## Package management
417

5-
Always use `yarn` instead of plain `npm`:
6-
- Yarn package resolution performance is better
7-
- Yarn selective dependency resolution is required to [deal with vulnerable sub-dependencies](#dealing-with-vulnerable-sub-dependencies)
8-
- Yarn workspaces feature may become commonly required
18+
* Always use `yarn` instead of plain `npm`:
19+
* Yarn package resolution performance is better
20+
* Yarn selective dependency resolution is required to [deal with vulnerable sub-dependencies](#dealing-with-vulnerable-sub-dependencies)
21+
* Yarn workspaces feature may become commonly required
22+
23+
## Code Review
24+
25+
There are simple guidelines when providing code review to a teammate. The most particular are:
26+
27+
* Review for bad variable names
28+
* Review bad class definition
29+
* Review for class names
30+
* Review for correct dependencies invocation
31+
* Review for specs
932

1033
## Dealing with vulnerable sub-dependencies
1134

stack/js/README.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)