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: CONTRIBUTING.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ We have a sophisticated CI process setup which gets run on every PR. You must pa
50
50
- Coverage reports should automatically be generated locally, and the `codecov` bot should also comment on your PR with the percentage, as well as links to the line-by-line coverage of each file touched by your PR.
51
51
- Ensure you have no lint errors.
52
52
- You can run `yarn lint` in any package or in the root.
53
+
- You can run `yarn lint:markdown` in the root.
53
54
- If you have made changes to any markdown documentation, ensure there are no spelling errors
54
55
- You can run `yarn check:spelling` in the root.
55
56
- Or if you are using vscode, you can use [`Code Spell Checker`](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) plugin.
@@ -60,7 +61,7 @@ We have a sophisticated CI process setup which gets run on every PR. You must pa
60
61
61
62
Once your changes are ready, you can raise a PR. The title of your PR should match the following format:
<sup>[2]</sup> Doesn't check other control flow statements, such as `break` or `continue`.
204
204
205
-
## tslint-microsoft-contrib rules
205
+
## `tslint-microsoft-contrib` rules
206
206
207
207
Rule listing is [here](https://github.com/Microsoft/tslint-microsoft-contrib#supported-rules).
208
208
Deprecated rules are excluded (`missing-jsdoc`, `missing-optional-annotation`, `no-duplicate-case`, `no-duplicate-parameter-names`, `no-function-constructor-with-string-args`, `no-increment-decrement`, `no-empty-interfaces`, `no-missing-visibility-modifiers`, `no-multiple-var-decl`, `no-reserved-keywords`, `no-stateless-class`, `no-var-self`, `no-unnecessary-bind`, and `valid-typeof`). See the docs in the link above to find out what to use instead.
Copy file name to clipboardexpand all lines: packages/eslint-plugin/docs/rules/class-literal-property-style.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Ensures that literals on classes are exposed in a consistent style (`class-literal-property-style`)
2
2
3
3
When writing TypeScript applications, it's typically safe to store literal values on classes using fields with the `readonly` modifier to prevent them from being reassigned.
4
-
When writing TypeScript libraries that could be used by Javascript users however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.
4
+
When writing TypeScript libraries that could be used by JavaScript users however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.
5
5
6
6
## Rule Details
7
7
@@ -11,7 +11,7 @@ By default this rule prefers the `fields` style as it means JS doesn't have to s
11
11
Note that this rule only checks for constant _literal_ values (string, template string, number, bigint, boolean, regexp, null). It does not check objects or arrays, because a readonly field behaves differently to a getter in those cases. It also does not check functions, as it is a common pattern to use readonly fields with arrow function values as auto-bound methods.
12
12
This is because these types can be mutated and carry with them more complex implications about their usage.
13
13
14
-
####The `fields` style
14
+
### The `fields` style
15
15
16
16
This style checks for any getter methods that return literal values, and requires them to be defined using fields with the `readonly` modifier instead.
17
17
@@ -50,7 +50,7 @@ class Mx {
50
50
}
51
51
```
52
52
53
-
####The `getters` style
53
+
### The `getters` style
54
54
55
55
This style checks for any `readonly` fields that are assigned literal values, and requires them to be defined as getters instead.
56
56
This style pairs well with the [`@typescript-eslint/prefer-readonly`](prefer-readonly.md) rule,
Copy file name to clipboardexpand all lines: packages/eslint-plugin/docs/rules/no-base-to-string.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Requires that `.toString()` is only called on objects which provide useful information when stringified (`no-base-to-string`)
2
2
3
-
JavaScript will call `toString()` on an object when it is converted to a string, such as when `+` adding to a string or in <code>`${}`</code> template literals.
3
+
JavaScript will call `toString()` on an object when it is converted to a string, such as when `+` adding to a string or in `${}` template literals.
4
4
5
5
The default Object `.toString()` returns `"[object Object]"`, so this rule requires stringified objects define a more useful `.toString()` method.
Copy file name to clipboardexpand all lines: packages/parser/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ Default `false`.
67
67
68
68
Enable parsing JSX when `true`. More details can be found [here](https://www.typescriptlang.org/docs/handbook/jsx.html).
69
69
70
-
**NOTE:** this setting does not affect known file types (`.js`, `.jsx`, `.ts`, `.tsx`, `.json`) because the typescript compiler has its own internal handling for known file extensions. The exact behavior is as follows:
70
+
**NOTE:** this setting does not affect known file types (`.js`, `.jsx`, `.ts`, `.tsx`, `.json`) because the TypeScript compiler has its own internal handling for known file extensions. The exact behavior is as follows:
71
71
72
72
- if `parserOptions.project` is _not_ provided:
73
73
-`.js`, `.jsx`, `.tsx` files are parsed as if this is true.
0 commit comments