0.0.5
- ref: désactive des règles pénibles - ref: désactive des règles en conflit avec Effect
This commit is contained in:
parent
32ed83d772
commit
64c121e89c
8 changed files with 167 additions and 104 deletions
|
|
@ -1,3 +1,4 @@
|
|||
// oxlint-disable no-magic-numbers
|
||||
import type { DummyRuleMap } from "oxlint";
|
||||
|
||||
const esLintRules: DummyRuleMap = {
|
||||
|
|
@ -227,6 +228,7 @@ const esLintRules: DummyRuleMap = {
|
|||
"eslint/no-shadow": [
|
||||
"deny",
|
||||
{
|
||||
allow: ["Option"],
|
||||
builtinGlobals: true,
|
||||
hoist: "functions-and-types",
|
||||
ignoreFunctionTypeParameterNameValueShadow: true,
|
||||
|
|
@ -369,7 +371,14 @@ const esLintRules: DummyRuleMap = {
|
|||
"eslint/radix": "deny",
|
||||
// This rule is inferior to the accuracy of the type-aware typescript/require-await rule.
|
||||
"eslint/require-await": "allow",
|
||||
"eslint/require-yield": "deny",
|
||||
/**
|
||||
* This rule generates warnings for generator functions that do not have the yield keyword.
|
||||
*
|
||||
* Probably a mistake.
|
||||
*
|
||||
* GCCH: Cette règle est désactivée car elle soulève des erreurs pour des `Effect.fn` sans `yield*`.
|
||||
*/
|
||||
"eslint/require-yield": "allow",
|
||||
// Rentre en conflit avec Perfectionnist.
|
||||
"eslint/sort-imports": "allow",
|
||||
// Rentre en conflit avec Perfectionnist.
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@ const jsDocRules: DummyRuleMap = {
|
|||
],
|
||||
"jsdoc/require-returns-description": "warn",
|
||||
"jsdoc/require-returns-type": "allow",
|
||||
/** GCCH: Pose soucis avec `Effect`. */
|
||||
"jsdoc/require-yields": [
|
||||
"warn",
|
||||
"allow",
|
||||
{
|
||||
forceRequireYields: false,
|
||||
withGeneratorTag: false,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// oxlint-disable no-magic-numbers
|
||||
import type { DummyRuleMap } from "oxlint";
|
||||
|
||||
const oxcRules: DummyRuleMap = {
|
||||
|
|
|
|||
|
|
@ -59,14 +59,24 @@ const typeScriptRules: DummyRuleMap = {
|
|||
prefer: "type-imports",
|
||||
},
|
||||
],
|
||||
/**
|
||||
* Enforce dot notation whenever property access can be written safely as `obj.prop`.
|
||||
*
|
||||
* Dot notation is generally more readable and concise than bracket notation for static property names.
|
||||
*/
|
||||
"typescript/dot-notation": [
|
||||
"deny",
|
||||
{
|
||||
allowIndexSignaturePropertyAccess: false,
|
||||
/** Allow bracket notation for properties covered by an index signature. */
|
||||
allowIndexSignaturePropertyAccess: true,
|
||||
/** Allow bracket notation for ES3 keyword property names (for example `obj["class"]`). */
|
||||
allowKeywords: false,
|
||||
/** Regex pattern for property names that are allowed to use bracket notation. */
|
||||
allowPattern: "",
|
||||
allowPrivateClassPropertyAccess: false,
|
||||
allowProtectedClassPropertyAccess: false,
|
||||
/** Allow bracket notation for private class members. */
|
||||
allowPrivateClassPropertyAccess: true,
|
||||
/** Allow bracket notation for protected class members. */
|
||||
allowProtectedClassPropertyAccess: true,
|
||||
},
|
||||
],
|
||||
"typescript/explicit-function-return-type": [
|
||||
|
|
@ -426,8 +436,9 @@ const typeScriptRules: DummyRuleMap = {
|
|||
types: "prefer-import",
|
||||
},
|
||||
],
|
||||
/** Trop de faux négatifs dans les pipelines. */
|
||||
"typescript/unbound-method": [
|
||||
"deny",
|
||||
"allow",
|
||||
{
|
||||
ignoreStatic: false,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue