Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Léo-Paul Géneau
gitlab-ce
Commits
ec0b6813
Commit
ec0b6813
authored
Jun 01, 2019
by
Ondřej Budai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix badly rendered code blocks in JavaScript styleguide
parent
2ad5b30b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
doc/development/fe_guide/style_guide_js.md
doc/development/fe_guide/style_guide_js.md
+5
-1
No files found.
doc/development/fe_guide/style_guide_js.md
View file @
ec0b6813
...
...
@@ -95,6 +95,7 @@ See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/
#### Modules, Imports, and Exports
1.
Use ES module syntax to import modules
```javascript
// bad
const SomeClass = require('some_class');
...
...
@@ -168,6 +169,7 @@ See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/
Do not use them anymore and feel free to remove them when refactoring legacy code.
1.
Avoid adding to the global namespace.
```javascript
// bad
window.MyClass = class { /* ... */ };
...
...
@@ -176,7 +178,8 @@ See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/
export default class MyClass { /* ... */ }
```
1.
Side effects are forbidden in any script which contains exports
1.
Side effects are forbidden in any script which contains export
```javascript
// bad
export default class MyClass { /* ... */ }
...
...
@@ -449,6 +452,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
#### Props
1.
Props should be declared as an object
```javascript
// bad
props: ['foo']
...
...
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