You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CODING_STANDARDS.md
+23-10Lines changed: 23 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,31 @@
2
2
3
3
## Coding guidelines for TypeScript
4
4
5
-
- The following standards are inspired from [Coding guidelines for TypeScript](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines) (which you should follow when something is not specified in this document, although any pre-existing practices in a file being edited trump either style guide).
5
+
- The following standards are inspired from
6
+
[Coding guidelines for TypeScript](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
7
+
(which you should follow when something is not specified in this document,
8
+
although any pre-existing practices in a file being edited trump either
9
+
style guide).
6
10
7
11
### Names
8
12
9
13
- Use `PascalCase` for type names.
10
-
- Use `I` as a prefix for interface names only when an interface is implemented by a class.
14
+
- Use `I` as a prefix for interface names only when an interface is
15
+
implemented by a class.
11
16
- Use `PascalCase` for enum values.
12
17
- Use `camelCase` for function names.
13
18
- Use `camelCase` for property names and local variables.
14
-
- Do not use `_` as a prefix for private properties (unless used as backing properties).
19
+
- Do not use `_` as a prefix for private properties (unless used as backing
20
+
properties).
15
21
- Use whole words in names when possible.
16
22
17
23
### Types
18
24
19
-
- Do not export types/functions unless you need to share it across multiple components.
25
+
- Do not export types/functions unless you need to share it across multiple
26
+
components.
20
27
- Do not introduce new types/values to the global namespace.
21
-
- Shared types should be defined in `types.ts`.
22
-
Within a file, type definitions should come first.
28
+
- Shared types should be defined in `types.ts`. Within a file, type
29
+
definitions should come first.
23
30
24
31
### null and undefined
25
32
@@ -37,16 +44,21 @@ Use single quotes for strings.
37
44
### Imports
38
45
39
46
- Use ES6 module imports.
40
-
- Do not use bare `import *`; all imports should either explicitly pull in an object or import an entire module, otherwise you're implicitly polluting the global namespace and making it difficult to figure out from code examination where a name originates from.
47
+
- Do not use bare `import *`; all imports should either explicitly pull in an
48
+
object or import an entire module, otherwise you're implicitly polluting the
49
+
global namespace and making it difficult to figure out from code examination
50
+
where a name originates from.
41
51
42
52
### Style
43
53
44
54
- Use `prettier` to format `TypeScript` and `JavaScript` code.
45
55
- Use arrow functions over anonymous function expressions.
46
-
- Always surround loop and conditional bodies with curly braces. Statements on the same line are allowed to omit braces.
56
+
- Always surround loop and conditional bodies with curly braces. Statements on
57
+
the same line are allowed to omit braces.
47
58
- Open curly braces always go on the same line as whatever necessitates them.
48
59
- Parenthesized constructs should have no surrounding whitespace.
49
-
- A single space follows commas, colons, and semicolons in those constructs. For example:
60
+
- A single space follows commas, colons, and semicolons in those constructs.
61
+
For example:
50
62
51
63
-`for (var i = 0, n = str.length; i < 10; i++) { }`
52
64
-`if (x < 10) { }`
@@ -58,4 +70,5 @@ Use single quotes for strings.
58
70
59
71
## Coding Standards for Python
60
72
61
-
Please follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html).
Copy file name to clipboardExpand all lines: PRIVACY.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,31 @@
2
2
3
3
## Data Collection
4
4
5
-
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
5
+
The software may collect information about you and your use of the software and
6
+
send it to Microsoft. Microsoft may use this information to provide services and
7
+
improve our products and services. You may turn off the telemetry as described
8
+
in the repository. There are also some features in the software that may enable
9
+
you and Microsoft to collect data from users of your applications. If you use
10
+
these features, you must comply with applicable law, including providing
11
+
appropriate notices to users of your applications together with a copy of
12
+
Microsoft's privacy statement. Our privacy statement is located at
13
+
https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about
14
+
data collection and use in the help documentation and our privacy statement.
15
+
Your use of the software operates as your consent to these practices.
6
16
7
17
## Disable Telemetry
8
18
9
-
The Microsoft Device Simulator Express Extension for Visual Studio Code collects usage
10
-
data and sends it to Microsoft to help improve our products and
11
-
services. Read our
12
-
[privacy statement](https://privacy.microsoft.com/privacystatement) to
13
-
learn more. This extension respects the `telemetry.enableTelemetry`
14
-
setting which you can learn more about at
19
+
The Microsoft Device Simulator Express Extension for Visual Studio Code collects
20
+
usage data and sends it to Microsoft to help improve our products and services.
21
+
Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to
22
+
learn more. This extension respects the `telemetry.enableTelemetry` setting
0 commit comments