From 5bfb1fd68b7235ce85eb6d3829cf6c3d8871edbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Zl=C3=A1mal?= Date: Wed, 17 Mar 2021 07:35:15 -0600 Subject: [PATCH] Remove FBT Babel workarounds It should no longer be needed, see: https://github.com/facebook/fbt/commit/ecc647d77ca0ce7d23c881fdc9e5fdbe22d6fa69 There is another issue though in Eslint which needs to be fixed, see: https://github.com/adeira/universe/issues/2005 adeira-source-id: 04788595362d400edf1d5f9e8f947d764ce361ef --- CHANGELOG.md | 1 + __tests__/__snapshots__/index.test.js.snap | 10 +--------- ourRules.js | 10 +--------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71aa70e..0f34793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Our custom rule `adeira/no-internal-flow-type` has been migrated to official `flowtype/no-internal-flow-type` (https://github.com/gajus/eslint-plugin-flowtype/pull/469). There should be no changes in behavior. +- Rule `react/forbid-dom-props` has been temporarily disabled because it causes problems with [FBT](https://facebook.github.io/fbt/) tags, see: https://github.com/adeira/universe/issues/2005 # 5.1.0 diff --git a/__tests__/__snapshots__/index.test.js.snap b/__tests__/__snapshots__/index.test.js.snap index d981ce5..2384160 100644 --- a/__tests__/__snapshots__/index.test.js.snap +++ b/__tests__/__snapshots__/index.test.js.snap @@ -743,15 +743,7 @@ Object { "react/destructuring-assignment": 0, "react/display-name": 0, "react/forbid-component-props": 0, - "react/forbid-dom-props": Array [ - 2, - Object { - "forbid": Array [ - "class", - "for", - ], - }, - ], + "react/forbid-dom-props": 0, "react/forbid-elements": 0, "react/forbid-foreign-prop-types": 0, "react/forbid-prop-types": 0, diff --git a/ourRules.js b/ourRules.js index fec5bd6..956d56b 100644 --- a/ourRules.js +++ b/ourRules.js @@ -361,15 +361,7 @@ module.exports = ({ 'react/destructuring-assignment': OFF, 'react/display-name': OFF, 'react/forbid-component-props': OFF, - 'react/forbid-dom-props': [ - ERROR, - { - forbid: [ - 'class', // https://reactjs.org/docs/dom-elements.html#classname - 'for', // https://reactjs.org/docs/dom-elements.html#htmlfor - ], - }, - ], + 'react/forbid-dom-props': OFF, 'react/forbid-elements': OFF, 'react/forbid-foreign-prop-types': OFF, 'react/forbid-prop-types': OFF,