Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
flot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
flot
Commits
fa025fab
Commit
fa025fab
authored
Dec 04, 2012
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated style guidelines for horizontal spacing.
parent
c6ddfa56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
CONTRIBUTING.md
CONTRIBUTING.md
+23
-6
No files found.
CONTRIBUTING.md
View file @
fa025fab
...
...
@@ -32,7 +32,26 @@ To make merging as easy as possible, please keep these rules in mind:
### Flot Style Guidelines ###
Flot follows the
[
jQuery Core Style Guidelines
](
http://docs.jquery.com/JQuery_Core_Style_Guidelines
)
,
with the following minor changes:
with the following updates and exceptions:
#### Spacing ####
Do not add horizontal space around parameter lists, loop definitions, or
array/object indices. For example:
```
js
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
// This block is wrong!
if
(
data
[
i
]
>
1
)
{
data
[
i
]
=
2
;
}
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
// This block is correct!
if
(
data
[
i
]
>
1
)
{
data
[
i
]
=
2
;
}
}
```
#### Comments ####
...
...
@@ -48,7 +67,7 @@ example:
// We're going to loop here
// TODO: Make this loop faster, better, stronger!
for
(
var
x
=
0
;
x
<
10
;
x
++
)
{}
for
(
var
x
=
0
;
x
<
10
;
x
++
)
{}
```
#### Wrapping ####
...
...
@@ -63,11 +82,9 @@ Statements containing complex logic should not be wrapped arbitrarily if they
do not exceed 80 characters. For example:
```
js
WRONG
if
(
a
==
1
&&
if
(
a
==
1
&&
// This block is wrong!
b
==
2
&&
c
==
3
)
{}
CORRECT
if
(
a
==
1
&&
b
==
2
&&
c
==
3
)
{}
if
(
a
==
1
&&
b
==
2
&&
c
==
3
)
{}
// This block is correct!
```
\ No newline at end of file
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