Forbid imports from nested directories of flipper-common, flipper-plugin, flipper-ui-core

Summary:
Forbid imports from nested directories of flipper-common, flipper-plugin, flipper-ui-core

In the stack of D32926830 I occasionally imported from flipper-plugin/src/... which is not allowed. This should fix any auto-import related issues once and for all.

Reviewed By: timur-valiev

Differential Revision: D32987054

fbshipit-source-id: f19f6278219961ad283cacfec094a6c703ca93f8
This commit is contained in:
Andrey Goncharov
2021-12-10 06:34:37 -08:00
committed by Facebook GitHub Bot
parent 9436c32ce9
commit adb2573a1f
10 changed files with 92 additions and 30 deletions

View File

@@ -1,21 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
module.exports = {
rules: {
'no-restricted-imports': [
'error',
{
// These paths lead to circular import issues in Flipper app and are forbidden
paths: ['flipper'],
patterns: ['flipper-ui-core/src/*'],
},
],
},
};

View File

@@ -9,6 +9,8 @@
import type {NotificationEvents} from './dispatcher/notifications';
import type {PluginNotification} from './reducers/notifications';
// TODO: Fix me
// eslint-disable-next-line no-restricted-imports
import type {NotificationConstructorOptions} from 'electron';
import {FlipperLib} from 'flipper-plugin';
import {FlipperServer, FlipperServerConfig} from 'flipper-common';