eslint-plugin-constructors 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,17 +55,15 @@ export default [
|
|
|
55
55
|
|
|
56
56
|
## Supported rules
|
|
57
57
|
|
|
58
|
-
<!-- eslint-disable markdown/no-missing-link-fragments -->
|
|
59
58
|
| ID | Description | Auto-fixable | Recommended |
|
|
60
59
|
| --- | --- | :-: | :-: |
|
|
61
60
|
| [`no-explicit-return`](#no-explicit-return) | Disallows explicit `return` statements in class constructors | ❌ | ✅ |
|
|
62
61
|
| [`require-error-subclass-name`](#require-error-subclass-name) | Requires classes extending `Error` to have names ending in `Error` | ❌ | ✅ |
|
|
63
62
|
| [`require-new`](#require-new-auto-fixable) | Requires `new` when calling error constructors | ✅ | ✅ |
|
|
64
|
-
<!-- eslint-enable markdown/no-missing-link-fragments -->
|
|
65
63
|
|
|
66
64
|
---
|
|
67
65
|
|
|
68
|
-
###
|
|
66
|
+
### `no-explicit-return`
|
|
69
67
|
|
|
70
68
|
> Disallows explicit `return` statements inside class constructors.
|
|
71
69
|
|
|
@@ -107,7 +105,7 @@ If you need to return a different object from a constructor.
|
|
|
107
105
|
|
|
108
106
|
---
|
|
109
107
|
|
|
110
|
-
###
|
|
108
|
+
### `require-error-subclass-name`
|
|
111
109
|
|
|
112
110
|
> Requires classes extending `Error` have a name ending in `Error`.
|
|
113
111
|
|
|
@@ -137,7 +135,7 @@ If you don't follow the convention of suffixing custom error classes w/ `Error`.
|
|
|
137
135
|
|
|
138
136
|
---
|
|
139
137
|
|
|
140
|
-
###
|
|
138
|
+
### `require-new` (auto-fixable)
|
|
141
139
|
|
|
142
140
|
> Requires `new` when calling error constructors (and optionally other built-in constructors).
|
|
143
141
|
|