Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
01514016
Commit
01514016
authored
3 years ago
by
DCoded
Browse files
Options
Downloads
Patches
Plain Diff
Minor contributing documentation tweaks
parent
5d267d63
No related branches found
No related tags found
1 merge request
!9364
Minor contributing documentation tweaks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CONTRIBUTING.md
+54
-12
54 additions, 12 deletions
CONTRIBUTING.md
with
54 additions
and
12 deletions
CONTRIBUTING.md
+
54
−
12
View file @
01514016
# Contributing to FC
p
regmod
# Contributing to FC
: P
regmod
First off, thanks for taking the time to contribute!
...
...
@@ -46,21 +46,63 @@ rules from `.eslintrc.json`.
*
prefer strict equality/inequality
*
etc.
###
JS
Doc
### Doc
umentation
It's a good idea to provide meaningful
JSDoc
for new functions and classes where possible. We follow
Typescript's JSDoc
type dialect for the most part (and we provide a Typescript configuration and
auxiliary type definition files if you'd
like to use it yourself...it's pretty nifty). Don't worry too much about
specific type syntax if you can't make TS work
or don't understand it, someone else will probably fix it for you as long
as you've made the intent clear in some form
of JSDoc.
It's a good idea to provide meaningful
documentation
for new functions and classes where possible. We follow
Typescript's
[
JSDoc
](
https://jsdoc.app
)
type dialect for the most part (and we provide a Typescript configuration and
auxiliary type definition files if you'd
like to use it yourself...it's pretty nifty). Don't worry too much about
specific type syntax if you can't make TS work
or don't understand it, someone else will probably fix it for you as long
as you've made the intent clear in some form
of JSDoc.
### Naming conventions
*
JS names are camelCase
`fooBar`
*
initial lowercase for variables and functions
`fooBar`
*
initial uppercase for classes and namespaces
`Foo.Bar`
*
all-caps for constants
*
CSS classes are kebob-case.
`foo-bar`
*
JavaScript variable and function names should be
`camelCase`
.
```
js
// bad
let
foobar
;
let
Foobar
;
let
FooBar
;
// good
let
fooBar
;
```
*
JavaScript constants should be
`ALLCAPS`
.
```
js
// bad
const
foo
=
'
foo
'
;
const
fooBar
=
'
fooBar
'
;
// good
const
FOO
=
'
foo
'
;
const
FOOBAR
=
'
fooBar
'
;
```
*
JavaScript classes and namespaces should be
`PascalCase`
.
```
js
// bad
class
foo
{}
class
FOO
{}
App
.
foo
.
bar
();
// good
class
Foo
{}
App
.
Foo
.
bar
();
```
*
CSS classes are
`kebob-case`
.
```
css
/* bad */
.fooBar
{}
.FOO-BAR
{}
/* good */
.foo-bar
{}
```
New code should generally get organized into the
`App`
namespace. See
`js/002-config/fc-init-js.js`
for a rough outline.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment