Skip to content

Commit 80aaa6c

Browse files
authored
Fix imports to work with new lint rules (#2003)
* Add eslint-plugin-import Signed-off-by: Aaron Raimist <[email protected]> * Autofix Signed-off-by: Aaron Raimist <[email protected]> * Manual fix Signed-off-by: Aaron Raimist <[email protected]>
1 parent 4e9fe8f commit 80aaa6c

34 files changed

+208
-32
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"browser-request": "^0.3.3",
5656
"bs58": "^4.0.1",
5757
"content-type": "^1.0.4",
58+
"eslint-plugin-import": "^2.25.2",
5859
"loglevel": "^1.7.1",
5960
"p-retry": "^4.5.0",
6061
"qs": "^6.9.6",

spec/TestClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ limitations under the License.
2020
import './olm-loader';
2121

2222
import MockHttpBackend from 'matrix-mock-request';
23+
2324
import { LocalStorageCryptoStore } from '../src/crypto/store/localStorage-crypto-store';
2425
import { logger } from '../src/logger';
2526
import { WebStorageSessionStore } from "../src/store/session/webstorage";

spec/browserify/sync-browserify.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ limitations under the License.
1717
// load XmlHttpRequest mock
1818
import "./setupTests";
1919
import "../../dist/browser-matrix"; // uses browser-matrix instead of the src
20+
import MockHttpBackend from "matrix-mock-request";
21+
2022
import { MockStorageApi } from "../MockStorageApi";
2123
import { WebStorageSessionStore } from "../../src/store/session/webstorage";
22-
import MockHttpBackend from "matrix-mock-request";
2324
import { LocalStorageCryptoStore } from "../../src/crypto/store/localStorage-crypto-store";
2425
import * as utils from "../test-utils";
2526

spec/integ/matrix-client-opts.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import * as utils from "../test-utils";
21
import HttpBackend from "matrix-mock-request";
2+
3+
import * as utils from "../test-utils";
34
import { MatrixClient } from "../../src/matrix";
45
import { MatrixScheduler } from "../../src/scheduler";
56
import { MemoryStore } from "../../src/store/memory";

spec/integ/megolm-integ.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616
*/
1717

1818
import anotherjson from "another-json";
19+
1920
import * as testUtils from "../test-utils";
2021
import { TestClient } from "../TestClient";
2122
import { logger } from "../../src/logger";

spec/unit/ReEmitter.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ limitations under the License.
1515
*/
1616

1717
import { EventEmitter } from "events";
18+
1819
import { ReEmitter } from "../../src/ReEmitter";
1920

2021
const EVENTNAME = "UnknownEntry";

spec/unit/autodiscovery.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616
*/
1717

1818
import MockHttpBackend from "matrix-mock-request";
19+
1920
import * as sdk from "../../src";
2021
import { AutoDiscovery } from "../../src/autodiscovery";
2122

spec/unit/crypto.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import '../olm-loader';
2+
import { EventEmitter } from "events";
3+
24
import { Crypto } from "../../src/crypto";
35
import { WebStorageSessionStore } from "../../src/store/session/webstorage";
46
import { MemoryCryptoStore } from "../../src/crypto/store/memory-crypto-store";
@@ -8,7 +10,6 @@ import { MatrixEvent } from "../../src/models/event";
810
import { Room } from "../../src/models/room";
911
import * as olmlib from "../../src/crypto/olmlib";
1012
import { sleep } from "../../src/utils";
11-
import { EventEmitter } from "events";
1213
import { CRYPTO_ENABLED } from "../../src/client";
1314
import { DeviceInfo } from "../../src/crypto/deviceinfo";
1415

spec/unit/crypto/cross-signing.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717

1818
import '../../olm-loader';
1919
import anotherjson from 'another-json';
20+
2021
import * as olmlib from "../../../src/crypto/olmlib";
2122
import { TestClient } from '../../TestClient';
2223
import { HttpResponse, setHttpResponses } from '../../test-utils';

spec/unit/crypto/outgoing-room-key-requests.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import {
1818
IndexedDBCryptoStore,
1919
} from '../../../src/crypto/store/indexeddb-crypto-store';
2020
import { MemoryCryptoStore } from '../../../src/crypto/store/memory-crypto-store';
21+
import { RoomKeyRequestState } from '../../../src/crypto/OutgoingRoomKeyRequestManager';
22+
2123
import 'fake-indexeddb/auto';
2224
import 'jest-localstorage-mock';
2325

24-
import { RoomKeyRequestState } from '../../../src/crypto/OutgoingRoomKeyRequestManager';
25-
2626
const requests = [
2727
{
2828
requestId: "A",

0 commit comments

Comments
 (0)