0.0.8
This commit is contained in:
parent
b73bd41af9
commit
8a36d0af43
4 changed files with 51 additions and 23 deletions
|
|
@ -12,19 +12,19 @@ export const règlesUnicorn: Readonly<Linter.Config> = {
|
|||
*
|
||||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md)
|
||||
*/
|
||||
"unicorn/catch-error-name": ["error"],
|
||||
"unicorn/catch-error-name": "error",
|
||||
/**
|
||||
* Préfère des types consistants lors de l'étalage d'un tableau de littéraux au sein d'une condition ternaire.
|
||||
*
|
||||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md)
|
||||
*/
|
||||
"unicorn/consistent-empty-array-spread": ["error"],
|
||||
"unicorn/consistent-empty-array-spread": "error",
|
||||
/**
|
||||
* Impose l'unique manière valide d'étendre la classe `Error`.
|
||||
*
|
||||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md)
|
||||
*/
|
||||
"unicorn/custom-error-definition": ["error"],
|
||||
"unicorn/custom-error-definition": "error",
|
||||
/**
|
||||
* Impose la comparaison explicite de propriétés `length` ou `size`. Cela inclut ici l'obligation de vérifier
|
||||
* qu'elles ne correspondent pas à `0` avec `!==`.
|
||||
|
|
@ -32,6 +32,22 @@ export const règlesUnicorn: Readonly<Linter.Config> = {
|
|||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md)
|
||||
*/
|
||||
"unicorn/explicit-length-check": ["error", { "non-zero": "not-equal" }],
|
||||
/**
|
||||
* Autorise ici l'usage de la méthode `forEach()` des tableaux.
|
||||
*
|
||||
* Je préfère cette méthode (ou celle de la librairie _Effect_) aux boucles.
|
||||
*
|
||||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md)
|
||||
*/
|
||||
"unicorn/no-array-for-each": "off",
|
||||
/**
|
||||
* Autorise ici l'usage de la méthode `reduce()` des tableaux.
|
||||
*
|
||||
* J'utilise occasionnellement cette méthode pour des opérations simples.
|
||||
*
|
||||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md)
|
||||
*/
|
||||
"unicorn/no-array-reduce": "off",
|
||||
/**
|
||||
* Interdit l'usage de conditions négatives pour la clarté du code.
|
||||
*
|
||||
|
|
@ -51,5 +67,13 @@ export const règlesUnicorn: Readonly<Linter.Config> = {
|
|||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md)
|
||||
*/
|
||||
"unicorn/no-null": "error",
|
||||
/**
|
||||
* N'impose pas ici l'usage de `.dataset` pour l'interaction avec les attributs d'Éléments DOM.
|
||||
*
|
||||
* L'ergonomie est réduite comparée aux méthodes `{get,has,set,remove}Attribute()`.
|
||||
*
|
||||
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md)
|
||||
*/
|
||||
"unicorn/prefer-dom-node-dataset": "off",
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue