Skip to content

Commit a23e7cb

Browse files
chore(release): 137.0.0
1 parent 9783a74 commit a23e7cb

File tree

5 files changed

+1807
-1905
lines changed

5 files changed

+1807
-1905
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
This project adheres to [Semantic Versioning](http://semver.org). Except add new
66
rule (it is breaking changed by default).
77

8+
## 137.0.0 - 2022-01-11
9+
10+
- Minimum supported `eslint` version is `8.6.0`.
11+
- Changed: minimum required `eslint-plugin-unicorn` version is now `^40.0.0`.
12+
- Added: `unicorn/no-thenable` rule.
13+
- Added: `unicorn/relative-url-style` rule.
14+
- Added: `unicorn/no-useless-promise-resolve-reject` rule.
15+
816
## 136.0.0 - 2021-11-26
917

1018
- Minimum supported `eslint` version is `8.3.0`.

lib/config/rules/ecmascript-6.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ module.exports = {
8888
enforceForRenamedProperties: false,
8989
},
9090
],
91+
// TODO REQUIRED to enable in future
92+
// disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`
93+
"prefer-object-has-own": "off",
9194
// Disallow parseInt() in favor of binary, octal, and hexadecimal literals
9295
"prefer-numeric-literals": "error",
9396
// Suggest using the rest parameters instead of arguments

lib/config/rules/unicorn.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ module.exports = {
110110
"unicorn/no-process-exit": "off",
111111
// Forbid classes that only have static members
112112
"unicorn/no-static-only-class": "off",
113+
// Disallow then property.
114+
"unicorn/no-thenable": "error",
113115
// TODO maybe enable in future
114116
// Disallow assigning `this` to a variable
115117
"unicorn/no-this-assignment": "off",
@@ -124,6 +126,8 @@ module.exports = {
124126
"unicorn/no-useless-fallback-in-spread": "error",
125127
// Disallow useless array length check
126128
"unicorn/no-useless-length-check": "error",
129+
// Disallow returning/yielding Promise.resolve/reject() in async functions or promise callbacks
130+
"unicorn/no-useless-promise-resolve-reject": "error",
127131
// Disallow useless spread
128132
"unicorn/no-useless-spread": "error",
129133
// Disallow useless `undefined`
@@ -170,6 +174,8 @@ module.exports = {
170174
"unicorn/prefer-export-from": "error",
171175
// Prefer `.includes()` over `.indexOf()` when checking for existence or non-existence
172176
"unicorn/prefer-includes": "error",
177+
// Prefer reading a JSON file as a buffer
178+
"unicorn/prefer-json-parse-buffer": "off",
173179
// Prefer `KeyboardEvent.key` over `KeyboardEvent.keyCode`
174180
// "unicorn/prefer-keyboard-event-key": "off",
175181
// Enforce the use of `Math.trunc` instead of bitwise operators
@@ -189,9 +195,6 @@ module.exports = {
189195
// TODO enable in future
190196
// Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object
191197
"unicorn/prefer-object-from-entries": "off",
192-
// TODO enabled in future
193-
// Prefer `Object.hasOwn(…)` over `Object.prototype.hasOwnProperty.call(…)`
194-
"unicorn/prefer-object-has-own": "off",
195198
// Prefer omitting the `catch` binding parameter.
196199
"unicorn/prefer-optional-catch-binding": "error",
197200
// Prefer borrowing methods from the prototype instead of the instance.
@@ -229,6 +232,8 @@ module.exports = {
229232
"unicorn/prefer-top-level-await": "off",
230233
// Prevent abbreviations
231234
"unicorn/prevent-abbreviations": "off",
235+
// Enforce consistent relative URL style
236+
"unicorn/relative-url-style": "error",
232237
// Enforce using the separator argument with `Array.join()`
233238
"unicorn/require-array-join-separator": "error",
234239
// Enforce using the digits argument with `Number.toFixed()`
@@ -241,4 +246,9 @@ module.exports = {
241246
"unicorn/template-indent": "off",
242247
// Require new when throwing an error (fixable)
243248
"unicorn/throw-new-error": "error",
249+
250+
// Deprecated
251+
// TODO enabled in future
252+
// Prefer `Object.hasOwn(…)` over `Object.prototype.hasOwnProperty.call(…)`
253+
// "unicorn/prefer-object-has-own": "off",
244254
};

0 commit comments

Comments
 (0)