From d8ecab699516631daafd7884d08c9d8861cb5b3d Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Tue, 27 Apr 2021 14:52:34 -0700 Subject: [PATCH] Deprecate imports from 'flipper' Summary: It is quite easy to miss some flipper imports, this lint rule makes them more visible. In the future we can eventually turn this into an error. Reviewed By: jknoxville Differential Revision: D28027118 fbshipit-source-id: 817b356634cb78b11b9216ce45429ea7a22f0e4f --- desktop/.eslintrc.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js index 147a95180..cb552a562 100644 --- a/desktop/.eslintrc.js +++ b/desktop/.eslintrc.js @@ -76,6 +76,14 @@ module.exports = { property: 'remote', }, ], + 'no-restricted-imports': [ + 1, + { + name: 'flipper', + message: + "Direct imports from 'flipper' are deprecated. Import from 'flipper-plugin' instead, which can be tested and distributed stand-alone. See https://fbflipper.com/docs/extending/sandy-migration for more details.", + }, + ], // additional rules for this project 'header/header': [2, 'block', {pattern}],