From 3ab69422433bec17b5d769d50186ba5ac63e7e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Tue, 22 Nov 2022 12:17:07 +0100 Subject: [PATCH] Add eslint warning on props spreading --- .eslintrc.cjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index cba5bedf8..7c2a9c9f6 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -85,6 +85,13 @@ module.exports = { 'react/no-unknown-property': ['error', { ignore: ['css'] }], + /** + * Warning on props spreading cause typescript doesn't check type on it: + * https://github.com/microsoft/TypeScript/issues/18801#issuecomment-332610604 + * Explicit spread is allow, example: + */ + 'react/jsx-props-no-spreading': ['warn', { explicitSpread: 'ignore' }], + // Auto fixable lint error 'prefer-const': 'error', 'padding-line-between-statements': [