Browse Source

feat(lint,ts) apply import order rules for TS files too

master
Saúl Ibarra Corretgé 6 months ago
parent
commit
0056bf04d1

+ 1
- 1
modules/RTCStats/RTCStats.ts View File

3
 import traceInit from '@jitsi/rtcstats/trace-ws';
3
 import traceInit from '@jitsi/rtcstats/trace-ws';
4
 
4
 
5
 import JitsiConference from '../../JitsiConference';
5
 import JitsiConference from '../../JitsiConference';
6
-import JitsiConnection from '../../JitsiConnection';
7
 import {
6
 import {
8
     BEFORE_STATISTICS_DISPOSED,
7
     BEFORE_STATISTICS_DISPOSED,
9
     CONFERENCE_CREATED_TIMESTAMP,
8
     CONFERENCE_CREATED_TIMESTAMP,
11
     CONFERENCE_LEFT,
10
     CONFERENCE_LEFT,
12
     CONFERENCE_UNIQUE_ID_SET
11
     CONFERENCE_UNIQUE_ID_SET
13
 } from '../../JitsiConferenceEvents';
12
 } from '../../JitsiConferenceEvents';
13
+import JitsiConnection from '../../JitsiConnection';
14
 import Settings from '../settings/Settings';
14
 import Settings from '../settings/Settings';
15
 import EventEmitter from '../util/EventEmitter';
15
 import EventEmitter from '../util/EventEmitter';
16
 
16
 

+ 4
- 4
modules/detection/NoAudioSignalDetection.ts View File

1
-import EventEmitter from '../util/EventEmitter';
1
+import type JitsiConference from '../../JitsiConference';
2
 import { JitsiConferenceEvents } from '../../JitsiConferenceEvents';
2
 import { JitsiConferenceEvents } from '../../JitsiConferenceEvents';
3
 import { JitsiTrackEvents } from '../../JitsiTrackEvents';
3
 import { JitsiTrackEvents } from '../../JitsiTrackEvents';
4
-import * as DetectionEvents from './DetectionEvents';
5
-
6
 import type JitsiLocalTrack from '../RTC/JitsiLocalTrack';
4
 import type JitsiLocalTrack from '../RTC/JitsiLocalTrack';
7
-import type JitsiConference from '../../JitsiConference';
8
 import type TraceablePeerConnection from '../RTC/TraceablePeerConnection';
5
 import type TraceablePeerConnection from '../RTC/TraceablePeerConnection';
6
+import EventEmitter from '../util/EventEmitter';
7
+
8
+import * as DetectionEvents from './DetectionEvents';
9
 
9
 
10
 // We wait a certain time interval for constant silence input from the current device to account for
10
 // We wait a certain time interval for constant silence input from the current device to account for
11
 // potential abnormalities and for a better use experience i.e. don't generate event the instant
11
 // potential abnormalities and for a better use experience i.e. don't generate event the instant

+ 1
- 1
modules/detection/P2PDominantSpeakerDetection.ts View File

1
+import JitsiConference from '../../JitsiConference';
1
 import * as JitsiConferenceEvents from '../../JitsiConferenceEvents';
2
 import * as JitsiConferenceEvents from '../../JitsiConferenceEvents';
2
 import RTCEvents from '../../service/RTC/RTCEvents';
3
 import RTCEvents from '../../service/RTC/RTCEvents';
3
-import JitsiConference from '../../JitsiConference';
4
 
4
 
5
 /**
5
 /**
6
  * The value which we use to say, every sound over this threshold
6
  * The value which we use to say, every sound over this threshold

+ 1
- 0
modules/detection/VADTalkMutedDetection.ts View File

1
 import EventEmitter from '../util/EventEmitter';
1
 import EventEmitter from '../util/EventEmitter';
2
 import { calculateAverage } from '../util/MathUtil';
2
 import { calculateAverage } from '../util/MathUtil';
3
+
3
 import { DETECTOR_STATE_CHANGE, VAD_TALK_WHILE_MUTED } from './DetectionEvents';
4
 import { DETECTOR_STATE_CHANGE, VAD_TALK_WHILE_MUTED } from './DetectionEvents';
4
 
5
 
5
 /**
6
 /**

+ 2
- 2
modules/proxyconnection/CustomSignalingLayer.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
 
2
 
3
 import { MediaType } from '../../service/RTC/MediaType';
3
 import { MediaType } from '../../service/RTC/MediaType';
4
-import SignalingLayer from '../../service/RTC/SignalingLayer';
4
+import { type IPeerMediaInfo, default as SignalingLayer } from '../../service/RTC/SignalingLayer';
5
 import ChatRoom from '../xmpp/ChatRoom';
5
 import ChatRoom from '../xmpp/ChatRoom';
6
-import type { IPeerMediaInfo } from '../../service/RTC/SignalingLayer';
6
+
7
 const logger = getLogger('modules/proxyconnection/CustomSignalingLayer');
7
 const logger = getLogger('modules/proxyconnection/CustomSignalingLayer');
8
 
8
 
9
 /**
9
 /**

+ 2
- 1
modules/recording/JibriSession.ts View File

1
 import { $iq } from 'strophe.js';
1
 import { $iq } from 'strophe.js';
2
 
2
 
3
-import recordingXMLUtils from './recordingXMLUtils';
4
 import JitsiParticipant from '../../JitsiParticipant';
3
 import JitsiParticipant from '../../JitsiParticipant';
5
 
4
 
5
+import recordingXMLUtils from './recordingXMLUtils';
6
+
6
 export interface IJibriSessionOptions {
7
 export interface IJibriSessionOptions {
7
     connection?: any;
8
     connection?: any;
8
     focusMucJid?: string;
9
     focusMucJid?: string;

+ 3
- 3
modules/statistics/SpeakerStatsCollector.ts View File

1
+import JitsiConference from '../../JitsiConference';
1
 import * as JitsiConferenceEvents from '../../JitsiConferenceEvents';
2
 import * as JitsiConferenceEvents from '../../JitsiConferenceEvents';
2
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
3
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
3
 
4
 
4
-import SpeakerStats from './SpeakerStats';
5
-import JitsiConference from '../../JitsiConference';
6
-import type { IFaceLandmarks } from './SpeakerStats';
5
+import { type IFaceLandmarks, default as SpeakerStats } from './SpeakerStats';
6
+
7
 /**
7
 /**
8
  * The value to use for the "type" field for messages sent
8
  * The value to use for the "type" field for messages sent
9
  * over the data channel that contain a face landmark.
9
  * over the data channel that contain a face landmark.

+ 1
- 1
modules/util/AsyncQueue.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import { queue, AsyncQueue as AsyncQueueType } from 'async-es';
2
+import { AsyncQueue as AsyncQueueType, queue } from 'async-es';
3
 
3
 
4
 const logger = getLogger('modules/util/AsyncQueue');
4
 const logger = getLogger('modules/util/AsyncQueue');
5
 
5
 

+ 1
- 1
modules/util/UsernameGenerator.ts View File

1
-import { randomElement, randomAlphanumStr } from './RandomUtil';
1
+import { randomAlphanumStr, randomElement } from './RandomUtil';
2
 
2
 
3
 /**
3
 /**
4
  * from faker.js - Copyright (c) 2014-2015 Matthew Bergman & Marak Squires
4
  * from faker.js - Copyright (c) 2014-2015 Matthew Bergman & Marak Squires

+ 2
- 1
modules/videosipgw/JitsiVideoSIPGWSession.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
 import { $iq } from 'strophe.js';
2
 import { $iq } from 'strophe.js';
3
-import ChatRoom from '../xmpp/ChatRoom';
3
+
4
 import Listenable from '../util/Listenable';
4
 import Listenable from '../util/Listenable';
5
+import ChatRoom from '../xmpp/ChatRoom';
5
 
6
 
6
 import * as VideoSIPGWConstants from './VideoSIPGWConstants';
7
 import * as VideoSIPGWConstants from './VideoSIPGWConstants';
7
 
8
 

+ 2
- 2
modules/videosipgw/VideoSIPGW.ts View File

2
 const logger = getLogger('modules/videosipgw/VideoSIPGW');
2
 const logger = getLogger('modules/videosipgw/VideoSIPGW');
3
 
3
 
4
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
4
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5
+import EventEmitter from '../util/EventEmitter';
6
+import ChatRoom from '../xmpp/ChatRoom';
5
 
7
 
6
 import JitsiVideoSIPGWSession from './JitsiVideoSIPGWSession';
8
 import JitsiVideoSIPGWSession from './JitsiVideoSIPGWSession';
7
 import * as Constants from './VideoSIPGWConstants';
9
 import * as Constants from './VideoSIPGWConstants';
8
-import ChatRoom from '../xmpp/ChatRoom';
9
-import EventEmitter from '../util/EventEmitter';
10
 
10
 
11
 
11
 
12
 export interface ISessionStateChangeEvent {
12
 export interface ISessionStateChangeEvent {

+ 2
- 0
modules/xmpp/AVModeration.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
 import { $msg } from 'strophe.js';
2
 import { $msg } from 'strophe.js';
3
+
3
 import { MediaType } from '../../service/RTC/MediaType';
4
 import { MediaType } from '../../service/RTC/MediaType';
4
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
6
+
5
 import ChatRoom from './ChatRoom';
7
 import ChatRoom from './ChatRoom';
6
 import XMPP from './xmpp';
8
 import XMPP from './xmpp';
7
 
9
 

+ 1
- 0
modules/xmpp/MockClasses.ts View File

1
 import { Strophe } from 'strophe.js';
1
 import { Strophe } from 'strophe.js';
2
+
2
 import Listenable from '../util/Listenable';
3
 import Listenable from '../util/Listenable';
3
 
4
 
4
 /* eslint-disable no-empty-function */
5
 /* eslint-disable no-empty-function */

+ 1
- 1
modules/xmpp/ResumeTask.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
+import Strophe from 'strophe.js';
2
 
3
 
3
 import {
4
 import {
4
     NETWORK_INFO_EVENT,
5
     NETWORK_INFO_EVENT,
5
     default as NetworkInfo
6
     default as NetworkInfo
6
 } from '../connectivity/NetworkInfo';
7
 } from '../connectivity/NetworkInfo';
7
 import { getJitterDelay } from '../util/Retry';
8
 import { getJitterDelay } from '../util/Retry';
8
-import Strophe from 'strophe.js';
9
 
9
 
10
 const logger = getLogger('modules/xmpp/ResumeTask');
10
 const logger = getLogger('modules/xmpp/ResumeTask');
11
 
11
 

+ 2
- 1
modules/xmpp/StropheLastSuccess.ts View File

2
  * Attaches to the {@link Strophe.Connection.rawInput} which is called whenever any data is received from the server.
2
  * Attaches to the {@link Strophe.Connection.rawInput} which is called whenever any data is received from the server.
3
  */
3
  */
4
 
4
 
5
-import XmppConnection from './XmppConnection';
6
 import { Strophe } from 'strophe.js';
5
 import { Strophe } from 'strophe.js';
7
 
6
 
7
+import XmppConnection from './XmppConnection';
8
+
8
 
9
 
9
 export default class LastRequestTracker {
10
 export default class LastRequestTracker {
10
     private _lastSuccess: number | null;
11
     private _lastSuccess: number | null;

+ 1
- 2
modules/xmpp/strophe.rayo.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
 import $ from 'jquery';
2
 import $ from 'jquery';
3
-import { $iq } from 'strophe.js';
4
-import type { Connection } from 'strophe.js';
3
+import { $iq, type Connection } from 'strophe.js';
5
 
4
 
6
 import ConnectionPlugin from './ConnectionPlugin';
5
 import ConnectionPlugin from './ConnectionPlugin';
7
 
6
 

+ 7
- 7
package-lock.json View File

29
         "@babel/core": "7.25.9",
29
         "@babel/core": "7.25.9",
30
         "@babel/preset-env": "7.25.9",
30
         "@babel/preset-env": "7.25.9",
31
         "@babel/preset-typescript": "7.25.9",
31
         "@babel/preset-typescript": "7.25.9",
32
-        "@jitsi/eslint-config": "6.0.3",
32
+        "@jitsi/eslint-config": "6.0.4",
33
         "@types/async": "3.2.12",
33
         "@types/async": "3.2.12",
34
         "@types/jasmine": "4.0.3",
34
         "@types/jasmine": "4.0.3",
35
         "@types/lodash-es": "4.17.12",
35
         "@types/lodash-es": "4.17.12",
1817
       "license": "BSD-3-Clause"
1817
       "license": "BSD-3-Clause"
1818
     },
1818
     },
1819
     "node_modules/@jitsi/eslint-config": {
1819
     "node_modules/@jitsi/eslint-config": {
1820
-      "version": "6.0.3",
1821
-      "resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-6.0.3.tgz",
1822
-      "integrity": "sha512-lGScJO9AASbt2H3XjktpkCZyD1Pp7AK3xGO+n4DIG7gp3KjL+BYKANmrx8pKY03yz7FTsieuTrUiO2IJ7mGQSw==",
1820
+      "version": "6.0.4",
1821
+      "resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-6.0.4.tgz",
1822
+      "integrity": "sha512-5ReSX/ruQi/JdsMAGRPMZL4WupCmWHEDAd8pFfvd48/JV43ku1fM0j3S3ORtl/QF4/medenRuWL633oyCGXXUA==",
1823
       "dev": true,
1823
       "dev": true,
1824
       "license": "Apache-2.0",
1824
       "license": "Apache-2.0",
1825
       "dependencies": {
1825
       "dependencies": {
10336
       "dev": true
10336
       "dev": true
10337
     },
10337
     },
10338
     "@jitsi/eslint-config": {
10338
     "@jitsi/eslint-config": {
10339
-      "version": "6.0.3",
10340
-      "resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-6.0.3.tgz",
10341
-      "integrity": "sha512-lGScJO9AASbt2H3XjktpkCZyD1Pp7AK3xGO+n4DIG7gp3KjL+BYKANmrx8pKY03yz7FTsieuTrUiO2IJ7mGQSw==",
10339
+      "version": "6.0.4",
10340
+      "resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-6.0.4.tgz",
10341
+      "integrity": "sha512-5ReSX/ruQi/JdsMAGRPMZL4WupCmWHEDAd8pFfvd48/JV43ku1fM0j3S3ORtl/QF4/medenRuWL633oyCGXXUA==",
10342
       "dev": true,
10342
       "dev": true,
10343
       "requires": {
10343
       "requires": {
10344
         "@babel/eslint-parser": "^7.25.9",
10344
         "@babel/eslint-parser": "^7.25.9",

+ 1
- 1
package.json View File

36
     "@babel/core": "7.25.9",
36
     "@babel/core": "7.25.9",
37
     "@babel/preset-env": "7.25.9",
37
     "@babel/preset-env": "7.25.9",
38
     "@babel/preset-typescript": "7.25.9",
38
     "@babel/preset-typescript": "7.25.9",
39
-    "@jitsi/eslint-config": "6.0.3",
39
+    "@jitsi/eslint-config": "6.0.4",
40
     "@types/async": "3.2.12",
40
     "@types/async": "3.2.12",
41
     "@types/jasmine": "4.0.3",
41
     "@types/jasmine": "4.0.3",
42
     "@types/lodash-es": "4.17.12",
42
     "@types/lodash-es": "4.17.12",

Loading…
Cancel
Save