Rocket.chat: Remove Globals

Created on 19 Oct 2018  路  3Comments  路  Source: RocketChat/Rocket.Chat

First step

Remove all globals from .eslintrc

Internal

  • __meteor_runtime_config__ may not be possible
  • __meteor_bootstrap__ may not be possible
  • Assets Cannot be imported Comment and Docs :-1:
  • chrome may not be possible
  • jscolor may not be possible
  • ~Npm~
  • ~Package~

TAPi18n
JitsiMeetExternalAPI (moved to own eslint file inside the package) https://github.com/RocketChat/Rocket.Chat/pull/13421
DynamicCss (moved to own eslint file inside the package) https://github.com/RocketChat/Rocket.Chat/pull/13421

  • ~globals~
  • ~language_names~
  • ~TAPi18next~

Working on

  • [x] Apps https://github.com/RocketChat/Rocket.Chat/pull/13409
  • [x] getAvatarSuggestionForUser
  • [x] handleError https://github.com/RocketChat/Rocket.Chat/pull/13421
  • [x] msgStream https://github.com/RocketChat/Rocket.Chat/pull/13421
  • [x] openRoom https://github.com/RocketChat/Rocket.Chat/pull/13421
  • [x] RocketChat https://github.com/RocketChat/Rocket.Chat/pull/13421
  • [x] roomExit https://github.com/RocketChat/Rocket.Chat/pull/13421
  • [x] Settings https://github.com/RocketChat/Rocket.Chat/pull/13421
  • [x] ~VRecDialog #13188~
  • [x] ~cordova #13188~
  • [x] ~device #13188~
  • [x] ~facebookConnectPlugin #13188~
  • [x] ~Servers #13188~
  • [x] ~TwitterConnect #13188~
  • [x] ~OnePassword~
  • [x] ~AccountBox #13132~
  • [x] ~Accounts #12377~
  • [x] ~AgentUsers #12942~
  • [x] ~alerts #13132~
  • [x] ~AudioRecorder #13132~
  • [x] ~Blaze #12433~
  • [x] ~BlazeLayout #12433~
  • [x] ~browser #12959~
  • [x] ~CachedChatSubscription #13132~
  • [x] ~ChatMessage #13132~
  • [x] ~chatMessages #13132~
  • [x] ~ChatMessages #13132~
  • [x] ~ChatRoom #13132~
  • [x] ~ChatSubscription #13132~
  • [x] ~check #12410~
  • [x] ~CryptoJS #12433~
  • [x] ~DDPRateLimiter #12433~
  • [x] ~Department #12942~
  • [x] ~EJSON #12377~
  • [x] ~Email #12377~
  • [x] ~FileUpload #13094~
  • [x] ~fileUpload #13132~
  • [x] ~fileUploadHandler #13094~
  • [x] ~fireGlobalEvent #13132~
  • [x] ~FlowRouter #12433~
  • [x] ~getAvatarUrlFromUsername #13132~
  • [x] ~getNextAgent #12942~
  • [x] ~handleError #12503~
  • [x] ~HTTP #12377~
  • [x] ~isChrome #13011~
  • [x] ~isFirefox #13011~
  • [x] ~isRtl #13005~
  • [x] ~KonchatNotification #13132~
  • [x] ~LivechatCustomField #12942~
  • [x] ~LivechatDepartment #12942~
  • [x] ~LivechatDepartmentAgents #12942~
  • [x] ~livechatManagerRoutes #12942~
  • [x] ~LivechatMonitoring #12942~
  • [x] ~LivechatPageVisited #12942~
  • [x] ~LivechatTrigger #12942~
  • [x] ~Logger #12995~
  • [x] ~Match #12410~
  • [x] ~menu #13132~
  • [x] ~Meteor #12371~
  • [x] ~modal #13132~
  • [x] ~Modernizr #13132~
  • [x] ~moment #12410~
  • [x] ~Mongo #12410~
  • [x] ~MsgTyping #13132~
  • [x] ~parentCall #12942~
  • [x] ~popout #13132~
  • [x] ~popover #13132~
  • [x] ~Promise #12433~
  • [x] ~Random #12377~
  • [x] ~ReactiveDict #12377~
  • [x] ~ReactiveVar #12377~
  • [x] ~readMessage #13132~
  • [x] ~Reload #12433~
  • [x] ~RocketChatFile #12650~
  • [x] ~RoomHistoryManager #13132~
  • [x] ~RoomManager #13132~
  • [x] ~RoomRoles #13132~
  • [x] ~ServiceConfiguration #12960~
  • [x] ~Session #12433~
  • [x] ~SHA256 #12377~
  • [x] ~SideNav #13132~
  • [x] ~t #13005~
  • [x] ~TAPi18n #12467~
  • [x] ~TAPi18next #12467~
  • [x] ~Template #12433~
  • [x] ~TimeSync #12959~
  • [x] ~toastr #12961~
  • [x] ~toolbarSearch #13098~
  • [x] ~Tracker #12410~
  • [x] ~Trigger #12942~
  • [x] ~Triggers #12942~
  • [x] ~UAParser #12433~
  • [x] ~updateAvatarOfUsername #13132~
  • [x] ~UserRoles #13132~
  • [x] ~VideoRecorder #13132~
  • [x] ~visitor #12942~
  • [x] ~WebApp #12377~

Second step

Remove all globals defined in files /* globals

  • [x] ~#12984~
  • [x] ~#12988~
  • [x] ~#12997~

Third step

Convert all packages to use Meteor modular package structure mainModule.

Will stay as a package

  • tap-i18n
  • rocketchat-i18n

Working on

  • [x] rocketchat-apps https://github.com/RocketChat/Rocket.Chat/pull/13409
  • [x] rocketchat-lib https://github.com/RocketChat/Rocket.Chat/pull/13420
  • [x] ~chatpal-search #12485~
  • [x] ~meteor-accounts-saml #12486~
  • [x] ~meteor-autocomplete #12491~
  • [x] ~meteor-timesync #12495~
  • [x] ~rocketchat-2fa #12501~
  • [x] ~rocketchat-accounts~
  • [x] ~rocketchat-action-links #12503~
  • [x] ~rocketchat-analytics #12501~
  • [x] ~rocketchat-api #12510~
  • [x] ~rocketchat-assets #12521~
  • [x] ~rocketchat-authorization #12523~
  • [x] ~rocketchat-autolinker #12529~
  • [x] ~rocketchat-autotranslate #12530~
  • [x] ~rocketchat-bigbluebutton~
  • [x] ~rocketchat-blockstack~
  • [x] ~rocketchat-bot-helpers #12531~
  • [x] ~rocketchat-cas #12532~
  • [x] ~rocketchat-channel-settings #12594~
  • [x] ~rocketchat-channel-settings-mail-messages #12537~
  • [x] ~rocketchat-colors #12538~
  • [x] ~rocketchat-cors #12595~
  • [x] ~rocketchat-crowd #12596~
  • [x] ~rocketchat-custom-oauth #13037~
  • [x] ~rocketchat-custom-sounds #12599~
  • [x] ~rocketchat-dolphin #12600~
  • [x] ~rocketchat-drupal #12601~
  • [x] ~rocketchat-e2e~
  • [x] ~rocketchat-emoji #12603~
  • [x] ~rocketchat-emoji-custom #12604~
  • [x] ~rocketchat-emoji-emojione #12605~
  • [x] ~rocketchat-error-handler #12606~
  • [x] ~rocketchat-favico #12607~
  • [x] ~rocketchat-file #12644~
  • [x] ~rocketchat-file-upload #13094~
  • [x] ~rocketchat-github-enterprise #12642~
  • [x] ~rocketchat-gitlab #12646~
  • [x] ~rocketchat-google-natural-language #12647~
  • [x] ~rocketchat-google-vision #12649~
  • [x] ~rocketchat-grant #12657~
  • [x] ~rocketchat-grant-facebook~
  • [x] ~rocketchat-grant-github~
  • [x] ~rocketchat-grant-google~
  • [x] ~rocketchat-graphql #12658~
  • [x] ~rocketchat-highlight-words #12659~
  • [x] ~rocketchat-iframe-login #12661~
  • [x] ~rocketchat-importer #12662~
  • [x] ~rocketchat-importer-csv #12663~
  • [x] ~rocketchat-importer-hipchat #12664~
  • [x] ~rocketchat-importer-hipchat-enterprise #12665~
  • [x] ~rocketchat-importer-slack #12666~
  • [x] ~rocketchat-importer-slack-users #12669~
  • [x] ~rocketchat-integrations #12670~
  • [x] ~rocketchat-internal-hubot #12671~
  • [x] ~rocketchat-irc #12672~
  • [x] ~rocketchat-issuelinks #12674~
  • [x] ~rocketchat-katex #12895~
  • [x] ~rocketchat-lazy-load~
  • [x] ~rocketchat-ldap #12678~
  • [x] ~rocketchat-livechat #12942~
  • [x] ~rocketchat-livestream #12679~
  • [x] ~rocketchat-logger #12995~
  • [x] ~rocketchat-mail-messages #12682~
  • [x] ~rocketchat-mailer #13036~
  • [x] ~rocketchat-mapview #12701~
  • [x] ~rocketchat-markdown #12755~
  • [x] ~rocketchat-mentions #12756~
  • [x] ~rocketchat-mentions-flextab #12757~
  • [x] ~rocketchat-message-action #12759~
  • [x] ~rocketchat-message-attachments #12760~
  • [x] ~rocketchat-message-mark-as-unread #12766~
  • [x] ~rocketchat-message-pin #12767~
  • [x] ~rocketchat-message-snippet #12768~
  • [x] ~rocketchat-message-star #12770~
  • [x] ~rocketchat-migrations #12772~
  • [x] ~rocketchat-nrr~
  • [x] ~rocketchat-oauth2-server-config #12773~
  • [x] ~rocketchat-oembed #12775~
  • [x] ~rocketchat-otr #12777~
  • [x] ~rocketchat-postcss~
  • [x] ~rocketchat-push-notifications #12778~
  • [x] ~rocketchat-reactions #12888~
  • [x] ~rocketchat-retention-policy #12797~
  • [x] ~rocketchat-sandstorm #12799~
  • [x] ~rocketchat-search #12801~
  • [x] ~rocketchat-setup-wizard #12806~
  • [x] ~rocketchat-slackbridge #12807~
  • [x] ~rocketchat-slashcommand-asciiarts #12808~
  • [x] ~rocketchat-slashcommands-archiveroom #12810~
  • [x] ~rocketchat-slashcommands-create #12811~
  • [x] ~rocketchat-slashcommands-help #12812~
  • [x] ~rocketchat-slashcommands-hide #12813~
  • [x] ~rocketchat-slashcommands-invite #12814~
  • [x] ~rocketchat-slashcommands-inviteall #12815~
  • [x] ~rocketchat-slashcommands-join #12816~
  • [x] ~rocketchat-slashcommands-kick #12817~
  • [x] ~rocketchat-slashcommands-leave #12821~
  • [x] ~rocketchat-slashcommands-me #12822~
  • [x] ~rocketchat-slashcommands-msg #12823~
  • [x] ~rocketchat-slashcommands-mute #12824~
  • [x] ~rocketchat-slashcommands-open #12825~
  • [x] ~rocketchat-slashcommands-topic #12826~
  • [x] ~rocketchat-slashcommands-unarchiveroom #12827~
  • [x] ~rocketchat-slider #12828~
  • [x] ~rocketchat-smarsh-connector #12830~
  • [x] ~rocketchat-sms #12831~
  • [x] ~rocketchat-spotify #12832~
  • [x] ~rocketchat-statistics #12833~
  • [x] ~rocketchat-theme #12896~
  • [x] ~rocketchat-token-login #12837~
  • [x] ~rocketchat-tokenpass #12838~
  • [x] ~rocketchat-tooltip #12839~
  • [x] ~rocketchat-tutum #12840 (Removed)~
  • [x] ~rocketchat-ui #13132~
  • [x] ~rocketchat-ui-account #12842~
  • [x] ~rocketchat-ui-admin #12844~
  • [x] ~rocketchat-ui-clean-history #12846~
  • [x] ~rocketchat-ui-flextab #12859~
  • [x] ~rocketchat-ui-login #12861~
  • [x] ~rocketchat-ui-master #13107~
  • [x] ~rocketchat-ui-message #12871~
  • [x] ~rocketchat-ui-sidenav #13098~
  • [x] ~rocketchat-ui-vrecord #12875~
  • [x] ~rocketchat-user-data-download #12877~
  • [x] ~rocketchat-version-check #12879~
  • [x] ~rocketchat-version~
  • [x] ~rocketchat-videobridge #12881~
  • [x] ~rocketchat-webdav #12886~
  • [x] ~rocketchat-webrtc #13117~
  • [x] ~rocketchat-wordpress #12887~

Extra Packages added to be able to unpacking

  • ~rocketchat:models #13027~
  • ~rocketchat:settings #13026~
  • ~rocketchat:callbacks #13034~
  • ~rocketchat:promises #13039~
  • ~rocketchat:utils #13011~
  • ~rocketchat:ui-utils #13005~
  • ~rocketchat:metrics #13032~
  • ~rocketchat:notifications #13035~
  • ~rocketchat:ui-cached-collection #13107~

Most helpful comment

@mrsimpson this is just the first and second fases :) we have more to come, the goal is have everything decoupled and rewritten in typescript 馃槢

All 3 comments

woah - what an epic! 馃憤 for the effort!

@mrsimpson this is just the first and second fases :) we have more to come, the goal is have everything decoupled and rewritten in typescript 馃槢

I've just found a global not tracked: AudioRecorder, from rocketchat-ui.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

royalaid picture royalaid  路  3Comments

marceloschmidt picture marceloschmidt  路  3Comments

engelgabriel picture engelgabriel  路  3Comments

Buzzele picture Buzzele  路  3Comments

mattlin picture mattlin  路  3Comments