Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
762f2d29
Commit
762f2d29
authored
Dec 17, 2014
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update codestyle.md
parent
24a88ea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
codestyle.md
codestyle.md
+4
-4
No files found.
codestyle.md
View file @
762f2d29
...
...
@@ -10,11 +10,11 @@ We think it's best for the project if the code you write looks like the code the
-
Semicolon
-
Strict mode
-
No trailing whitespace
-
Variable
s at the top of the
scope
-
Variable
declaration at the top of the scope when used by both outer and inner
scope
-
Multiple variable statements
-
Space after keywords and between arguments and operators
-
Return early
-
JSHint valid
-
JSHint
and JSCS
valid
-
Consistency
Example:
...
...
@@ -23,14 +23,14 @@ Example:
'
use strict
'
;
function
foo
(
bar
,
fum
)
{
var
i
,
l
,
ret
;
var
ret
;
var
hello
=
'
Hello
'
;
if
(
!
bar
)
{
return
;
}
for
(
i
=
0
,
l
=
bar
.
length
;
i
<
l
;
i
++
)
{
for
(
var
i
=
0
;
i
<
bar
.
length
;
i
++
)
{
if
(
bar
[
i
]
===
hello
)
{
ret
+=
fum
(
bar
[
i
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment