* replace inside of comp/withtooltip * remove overlay trigger eslint rl * update location of prev migrated new tooltips * copy button * shared_channel_indicator, shared_user_indicator.tsx, size_aware_image * actions_menu, old_admin_settings, schema_admin_settings, admin_settings * billing_summary, brand_image_setting, edit_section_edit_table_row, elapsed_duration_cell * permissions_scheme_summary,secure_connections/controls,system_users_column_toggler_menu,system_users_export,group/group_users/users_to_remove_groups * team_profile,user_grid_role_dropdown,priority_labels,toggle_formatting_bar,use_emoji_picker,formatting_icon * show_formatting,alert_banner others * more * snap fix * add disabled prop to menu * test fix for avatar feat: Add id to WithTooltip in Avatars component to fix test failures * combine refs in withtooltip * channel header title favorite test fix * priority label comp changes * types check for children * Update avatar.tsx * e2e fixes * fix E2E tests * Remove memo from WithTooltip I found that the web app leaks a fair bit less memory when this is removed. See https://community.mattermost.com/core/pl/gwyyoww9gtbg8fddoic9meq84y for more information * e2e lint fixes * e2e fixes * Fix test style issue --------- Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com> Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
@mattermost/eslint-plugin
An ESLint plugin containing the configuration used by Mattermost as well as support for custom rules specific to the Mattermost code base.
Custom Rules
no-dispatch-getstate
Prevents passing a redux store's getState into its dispatch as an unnecessary second argument.
We started doing this accidentally at some point because of a misunderstanding about how redux-thunk worked, so this stops anyone from making that same mistake again.
Examples of incorrect code for this rule:
export function someAction() {
return (dispatch, getState) => {
dispatch(doSomething(), getState);
};
}
Examples of correct code for this rule:
export function someAction() {
return (dispatch) => {
dispatch(doSomething());
};
}
use-external-link
Ensures that any link which opens a URL outside of Mattermost using target="_blank" uses the ExternalLink component.
Examples of incorrect code for this rule:
export function SomeLink() {
return (
<a
href="https://example.com"
target="_blank"
rel="noopener noreferrer"
/>
);
}
Examples of correct code for this rule:
import ExternalLink from 'components/external_link';
export function SomeLink() {
return <ExternalLink href="https://example.com"/>;
}