@@ -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