Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32221647
D6694.1765198805.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D6694.1765198805.diff
View Options
diff --git a/.eslintrc.json b/.eslintrc.json
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -36,6 +36,7 @@
"react/prop-types": ["error", { "skipUndeclared": true }],
"no-shadow": 1,
"no-var": "error",
+ "import/extensions": ["error", "always"],
"import/order": [
"warn",
{
diff --git a/desktop/src/auto-update.js b/desktop/src/auto-update.js
--- a/desktop/src/auto-update.js
+++ b/desktop/src/auto-update.js
@@ -1,5 +1,6 @@
// @flow
+// eslint-disable-next-line import/extensions
import { app, ipcMain, autoUpdater } from 'electron/main';
const getUpdateUrl = version =>
diff --git a/desktop/src/main.js b/desktop/src/main.js
--- a/desktop/src/main.js
+++ b/desktop/src/main.js
@@ -8,6 +8,7 @@
ipcMain,
systemPreferences,
autoUpdater,
+ // eslint-disable-next-line import/extensions
} from 'electron/main';
import fs from 'fs';
import path from 'path';
diff --git a/desktop/src/preload.js b/desktop/src/preload.js
--- a/desktop/src/preload.js
+++ b/desktop/src/preload.js
@@ -1,5 +1,6 @@
// @flow
+// eslint-disable-next-line import/extensions
import { contextBridge, ipcRenderer } from 'electron/renderer';
import type { ElectronBridge } from 'lib/types/electron-types.js';
diff --git a/keyserver/src/responders/landing-handler.js b/keyserver/src/responders/landing-handler.js
--- a/keyserver/src/responders/landing-handler.js
+++ b/keyserver/src/responders/landing-handler.js
@@ -1,9 +1,10 @@
// @flow
-import html from 'common-tags/lib/html';
+import html from 'common-tags/lib/html/index.js';
import type { $Response, $Request } from 'express';
import fs from 'fs';
import * as React from 'react';
+// eslint-disable-next-line import/extensions
import ReactDOMServer from 'react-dom/server';
import { promisify } from 'util';
diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -1,10 +1,11 @@
// @flow
-import html from 'common-tags/lib/html';
+import html from 'common-tags/lib/html/index.js';
import type { $Response, $Request } from 'express';
import fs from 'fs';
import _keyBy from 'lodash/fp/keyBy.js';
import * as React from 'react';
+// eslint-disable-next-line import/extensions
import ReactDOMServer from 'react-dom/server';
import { promisify } from 'util';
diff --git a/landing/script.js b/landing/script.js
--- a/landing/script.js
+++ b/landing/script.js
@@ -6,6 +6,7 @@
import invariant from 'invariant';
import React from 'react';
+// eslint-disable-next-line import/extensions
import { hydrateRoot } from 'react-dom/client';
import Root from './root.js';
diff --git a/lib/utils/wagmi-utils.js b/lib/utils/wagmi-utils.js
--- a/lib/utils/wagmi-utils.js
+++ b/lib/utils/wagmi-utils.js
@@ -1,7 +1,9 @@
// @flow
import { chain, configureChains, createClient } from 'wagmi';
+// eslint-disable-next-line import/extensions
import { alchemyProvider } from 'wagmi/providers/alchemy';
+// eslint-disable-next-line import/extensions
import { publicProvider } from 'wagmi/providers/public';
// details can be found https://0.6.x.wagmi.sh/docs/providers/configuring-chains
diff --git a/native/components/swipeable.js b/native/components/swipeable.js
--- a/native/components/swipeable.js
+++ b/native/components/swipeable.js
@@ -2,6 +2,7 @@
import * as React from 'react';
import { Animated, View } from 'react-native';
+// eslint-disable-next-line import/extensions
import SwipeableComponent from 'react-native-gesture-handler/Swipeable';
import { useSelector } from 'react-redux';
diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js
--- a/native/navigation/app-navigator.react.js
+++ b/native/navigation/app-navigator.react.js
@@ -3,7 +3,7 @@
import * as SplashScreen from 'expo-splash-screen';
import * as React from 'react';
import { useSelector } from 'react-redux';
-import { PersistGate } from 'redux-persist/integration/react';
+import { PersistGate } from 'redux-persist/es/integration/react.js';
import ActionResultModal from './action-result-modal.react.js';
import { CommunityDrawerNavigator } from './community-drawer-navigator.react.js';
diff --git a/native/push/push-handler.react.js b/native/push/push-handler.react.js
--- a/native/push/push-handler.react.js
+++ b/native/push/push-handler.react.js
@@ -46,7 +46,7 @@
iosPushPermissionResponseReceived,
CommIOSNotifications,
getCommIOSNotificationsEventEmitter,
-} from './ios';
+} from './ios.js';
import {
type MessageListParams,
useNavigateToThread,
diff --git a/native/redux/dev-tools.js b/native/redux/dev-tools.js
--- a/native/redux/dev-tools.js
+++ b/native/redux/dev-tools.js
@@ -11,7 +11,7 @@
// can no longer rely on the debugger to set these globals. We have to set them
// ourselves to work with remote-redux-devtools
if (__DEV__ && global.HermesInternal && !global.__REDUX_DEVTOOLS_EXTENSION__) {
- const { connect } = require('remotedev/src');
+ const { connect } = require('remotedev/src/index.js');
global.__REDUX_DEVTOOLS_EXTENSION__ = {
connect: ({ name }) =>
connect({
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -514,7 +514,7 @@
let composeFunc = compose;
if (__DEV__ && global.HermesInternal) {
- const { composeWithDevTools } = require('remote-redux-devtools/src');
+ const { composeWithDevTools } = require('remote-redux-devtools/src/index.js');
composeFunc = composeWithDevTools({
name: 'Redux',
hostname: getDevServerHostname(),
diff --git a/native/root.react.js b/native/root.react.js
--- a/native/root.react.js
+++ b/native/root.react.js
@@ -16,7 +16,7 @@
initialWindowMetrics,
} from 'react-native-safe-area-context';
import { Provider } from 'react-redux';
-import { PersistGate as ReduxPersistGate } from 'redux-persist/integration/react';
+import { PersistGate as ReduxPersistGate } from 'redux-persist/es/integration/react.js';
import { ENSCacheProvider } from 'lib/components/ens-cache-provider.react.js';
import { actionLogger } from 'lib/utils/action-logger.js';
diff --git a/native/types/react-native.js b/native/types/react-native.js
--- a/native/types/react-native.js
+++ b/native/types/react-native.js
@@ -7,21 +7,20 @@
Layout,
LayoutEvent,
ScrollEvent,
-} from 'react-native/Libraries/Types/CoreEventTypes';
+} from 'react-native/Libraries/Types/CoreEventTypes.js';
export type {
ContentSizeChangeEvent,
KeyPressEvent,
BlurEvent,
-} from 'react-native/Libraries/Components/TextInput/TextInput';
+ SelectionChangeEvent,
+} from 'react-native/Libraries/Components/TextInput/TextInput.js';
-export type { SelectionChangeEvent } from 'react-native/Libraries/Components/TextInput/TextInput';
+export type { NativeMethods } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes.js';
-export type { NativeMethods } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
+export type { KeyboardEvent } from 'react-native/Libraries/Components/Keyboard/Keyboard.js';
-export type { KeyboardEvent } from 'react-native/Libraries/Components/Keyboard/Keyboard';
-
-export type { EventSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
+export type { EventSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter.js';
export type AnimatedValue = ReactNativeAnimatedValue;
diff --git a/native/utils/dev-hostname.js b/native/utils/dev-hostname.js
--- a/native/utils/dev-hostname.js
+++ b/native/utils/dev-hostname.js
@@ -22,7 +22,7 @@
// example of native/facts/network.json:
// { "natDevHostname": "192.168.1.x" }
// $FlowExpectedError: It's a conditional require so the file may not exist
- const hostname: string = require('../facts/network').natDevHostname;
+ const hostname: string = require('../facts/network.json').natDevHostname;
warnNatDevHostnameUndefined = false;
return hostname;
} catch (e) {
diff --git a/scripts/get_clang_paths_cli.js b/scripts/get_clang_paths_cli.js
--- a/scripts/get_clang_paths_cli.js
+++ b/scripts/get_clang_paths_cli.js
@@ -1,6 +1,6 @@
// @flow
-const { clangPaths } = require('./get_clang_paths');
+const { clangPaths } = require('./get_clang_paths.js');
(() => {
let command = '(';
diff --git a/web/account/siwe-button.react.js b/web/account/siwe-button.react.js
--- a/web/account/siwe-button.react.js
+++ b/web/account/siwe-button.react.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react';
-import { FaEthereum } from 'react-icons/fa';
+import { FaEthereum } from 'react-icons/fa/index.js';
import css from './siwe.css';
import Button from '../components/button.react.js';
diff --git a/web/chat/chat-thread-list-see-more-sidebars.react.js b/web/chat/chat-thread-list-see-more-sidebars.react.js
--- a/web/chat/chat-thread-list-see-more-sidebars.react.js
+++ b/web/chat/chat-thread-list-see-more-sidebars.react.js
@@ -2,7 +2,7 @@
import classNames from 'classnames';
import * as React from 'react';
-import { IoIosMore } from 'react-icons/io';
+import { IoIosMore } from 'react-icons/io/index.js';
import { useModalContext } from 'lib/components/modal-provider.react.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
diff --git a/web/root.js b/web/root.js
--- a/web/root.js
+++ b/web/root.js
@@ -6,8 +6,8 @@
import { createStore, applyMiddleware, type Store } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction.js';
import { persistReducer, persistStore } from 'redux-persist';
-import { PersistGate } from 'redux-persist/integration/react';
-import storage from 'redux-persist/lib/storage';
+import { PersistGate } from 'redux-persist/es/integration/react.js';
+import storage from 'redux-persist/es/storage/index.js';
import thunk from 'redux-thunk';
import { reduxLoggerMiddleware } from 'lib/utils/action-logger.js';
diff --git a/web/script.js b/web/script.js
--- a/web/script.js
+++ b/web/script.js
@@ -4,6 +4,7 @@
import invariant from 'invariant';
import React from 'react';
+// eslint-disable-next-line import/extensions
import { hydrateRoot } from 'react-dom/client';
import Root from './root.js';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 1:00 PM (6 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848387
Default Alt Text
D6694.1765198805.diff (10 KB)
Attached To
Mode
D6694: Add ESLint rule to enforce extensions for imports
Attached
Detach File
Event Timeline
Log In to Comment