use allowImportNames

pull/230345/head
Sandeep Somavarapu 2024-10-03 09:38:41 +02:00
parent 546ea6d00a
commit 129ea2946b
No known key found for this signature in database
GPG Key ID: DD41CAAC8081CC7D
1 changed files with 3 additions and 34 deletions

View File

@ -700,40 +700,9 @@ module.exports = tseslint.config(
'paths': [
{
'name': 'electron',
'importNames': [
'app',
'autoUpdater',
'BaseWindow',
'BrowserWindow',
'contentTracing',
'desktopCapturer',
'dialog',
'globalShortcut',
'inAppPurchase',
'ipcMain',
'Menu',
'MenuItem',
'MessageChannelMain',
'MessagePortMain',
'nativeTheme',
'netLog',
'Notification',
'powerMonitor',
'powerSaveBlocker',
'protocol',
'pushNotifications',
'safeStorage',
'screen',
'session',
'ShareMenu',
'TouchBar',
'Tray',
'utilityProcess',
'View',
'webContents',
'webFrameMain',
'webContentsView',
'default'
'allowImportNames': [
'net',
'system-preferences',
],
'message': 'Only net and system-preferences are allowed to be imported from electron'
}