- ref: désactive des règles pénibles
- ref: désactive des règles en conflit avec Effect
This commit is contained in:
gcch 2026-04-15 18:12:15 +02:00
commit 201c4de5e8
8 changed files with 118 additions and 89 deletions

View file

@ -1,3 +1,4 @@
// oxlint-disable no-magic-numbers
import type { DummyRuleMap } from "oxlint";
const unicornRules: DummyRuleMap = {
@ -53,8 +54,8 @@ const unicornRules: DummyRuleMap = {
/**
* Enforces the only valid way of `Error` subclassing. It works with any super class that ends in `Error`.
*
* Incorrectly defined custom errors can lead to unexpected behavior when catching and identifying errors. Missing
* `super()` calls, wrong `name` property values, or non-standard class names make error handling unreliable.
* Incorrectly defined custom errors can lead to unexpected behaviour when catching and identifying errors. Missing
* `super()` calls, wrong `name` property values, or nonstandard class names make error handling unreliable.
*/
"unicorn/custom-error-definition": "deny",
/**
@ -103,7 +104,7 @@ const unicornRules: DummyRuleMap = {
multipleFileExtensions: true,
},
],
/** Enforces the use of `new` for many builtins and disallow it for some other. */
/** Enforces the use of `new` for many built-ins and disallow it for some other. */
"unicorn/new-for-builtins": "deny",
/** Disallows `oxlint-disable` or `eslint-disable` comments without specifying rules. */
"unicorn/no-abusive-eslint-disable": "deny",
@ -120,14 +121,14 @@ const unicornRules: DummyRuleMap = {
* Prevents passing a function reference directly to iterator methods.
*
* Passing functions to iterator methods can cause issues when the function is changed without realizing that the
* iterator passes 2 more parameters to it (index and array). This can lead to unexpected behavior when the function
* signature changes.
* iterator passes two more parameters to it (index and array). This can lead to unexpected behaviour when the
* function signature changes.
*
* Cause des soucis avec les pipelines `Effect`.
* GCCH: Cause des soucis avec les pipelines `Effect`.
*/
"unicorn/no-array-callback-reference": "allow",
/**
* Forbids the use of Array#forEach in favor of a for loop.
* Forbids the use of Array#forEach in favour of a for loop.
*
* Je préfère utiliser les méthodes `.forEach` dans les pipelines.
*/