mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-04 02:36:49 +07:00
fix: typo in code guidelines
Co-authored-by: Maksim Sukharev <antreesy.web@gmail.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
@@ -8,7 +8,7 @@ HTML
|
||||
- HTML should be HTML5 compliant
|
||||
- Avoid more than one tag per line
|
||||
- Always indent blocks
|
||||
- Try to avoid IDs inst
|
||||
- Try to avoid IDs instead prefer classes.
|
||||
|
||||
**DO**
|
||||
|
||||
@@ -28,8 +28,8 @@ HTML
|
||||
CSS
|
||||
---
|
||||
|
||||
- Do not bind your CSS to much to your HTML structure.
|
||||
- Try to avoid IDs for query selectors but use classes.
|
||||
- Do not bind your CSS too much to your HTML structure.
|
||||
- Try to avoid using IDs and tags for query selectors, but use classes.
|
||||
- Try to make your CSS reusable by grouping common attributes into classes.
|
||||
- Take a look at the `Writing Tactical CSS & HTML <https://www.youtube.com/watch?v=hou2wJCh3XE&feature=plcp>`_ video on YouTube.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ JavaScript and Typescript
|
||||
General rules and advices
|
||||
-------------------------
|
||||
|
||||
- Nextcloud uses Vue.js for its interface, for a consistent user interface we recommend apps to also use Vue with the nextcloud provided components.
|
||||
- Nextcloud uses Vue.js for its interface, for a consistent user interface we recommend apps to also use Vue with :ref:`provided components <js-library_nextcloud-vue>`.
|
||||
Yet also vanilla JavaScript and HTML can be used.
|
||||
- We recommend using Typescript for its type checking and improved static code analysis features.
|
||||
- Do not create global variables, instead if needed use global namespace objects like ``OCA.YourApp.…``
|
||||
@@ -127,10 +127,10 @@ Naming and casing
|
||||
interface I_request { /* ... */ }
|
||||
type arguments = string[]
|
||||
|
||||
Indention
|
||||
"""""""""
|
||||
Indentation
|
||||
"""""""""""
|
||||
|
||||
- Use tabs instead of spaces for indention - tab width is 4 spaces.
|
||||
- Use tabs instead of spaces for indenting - tab width is 4 spaces.
|
||||
|
||||
- You can align e.g. comments using spaces if needed.
|
||||
|
||||
@@ -607,7 +607,7 @@ Objects
|
||||
const obj = {
|
||||
first: 1,
|
||||
- second: 2
|
||||
- second: 2,
|
||||
+ second: 2,
|
||||
+ third: 3
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user