mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-55455] Add "no-constant-binary-expression" eslint rule (#25410)
This commit is contained in:
parent
a9a879d00d
commit
bbfb2f11bc
@ -6942,27 +6942,6 @@ const AdminDefinition: AdminDefinitionType = {
|
|||||||
placeholder_default: 'E.g.: "teamname"',
|
placeholder_default: 'E.g.: "teamname"',
|
||||||
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
|
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'bool',
|
|
||||||
key: 'ExperimentalSettings.UseNewSAMLLibrary',
|
|
||||||
label: t('admin.experimental.experimentalUseNewSAMLLibrary.title'),
|
|
||||||
label_default: 'Use Improved SAML Library (Beta):',
|
|
||||||
help_text: t('admin.experimental.experimentalUseNewSAMLLibrary.desc'),
|
|
||||||
help_text_default: 'Enable an updated SAML Library, which does not require the XML Security Library (xmlsec1) to be installed. Warning: Not all providers have been tested. If you experience issues, please contact <linkSupport>support</linkSupport>. Changing this setting requires a server restart before taking effect.',
|
|
||||||
help_text_markdown: false,
|
|
||||||
help_text_values: {
|
|
||||||
linkSupport: (msg: string) => (
|
|
||||||
<ExternalLink
|
|
||||||
location='admin_console'
|
|
||||||
href='https://mattermost.com/support'
|
|
||||||
>
|
|
||||||
{msg}
|
|
||||||
</ExternalLink>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
isHidden: true || it.not(it.licensedForFeature('SAML')),
|
|
||||||
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'color',
|
type: 'color',
|
||||||
key: 'SamlSettings.LoginButtonColor',
|
key: 'SamlSettings.LoginButtonColor',
|
||||||
|
@ -119,7 +119,7 @@ export function Menu(props: Props) {
|
|||||||
if (isKeyPressed(event, Constants.KeyCodes.ENTER) || isKeyPressed(event, Constants.KeyCodes.SPACE)) {
|
if (isKeyPressed(event, Constants.KeyCodes.ENTER) || isKeyPressed(event, Constants.KeyCodes.SPACE)) {
|
||||||
const target = event.target as HTMLElement;
|
const target = event.target as HTMLElement;
|
||||||
const ariaHasPopupAttribute = target?.getAttribute('aria-haspopup') === 'true';
|
const ariaHasPopupAttribute = target?.getAttribute('aria-haspopup') === 'true';
|
||||||
const ariaHasExpandedAttribute = target?.getAttribute('aria-expanded') !== null ?? false;
|
const ariaHasExpandedAttribute = target?.getAttribute('aria-expanded') === 'true';
|
||||||
|
|
||||||
if (ariaHasPopupAttribute && ariaHasExpandedAttribute) {
|
if (ariaHasPopupAttribute && ariaHasExpandedAttribute) {
|
||||||
// Avoid closing the sub menu item on enter
|
// Avoid closing the sub menu item on enter
|
||||||
|
@ -933,8 +933,6 @@
|
|||||||
"admin.experimental.experimentalPrimaryTeam.desc": "The primary team of which users on the server are members. When a primary team is set, the options to join other teams or leave the primary team are disabled.",
|
"admin.experimental.experimentalPrimaryTeam.desc": "The primary team of which users on the server are members. When a primary team is set, the options to join other teams or leave the primary team are disabled.",
|
||||||
"admin.experimental.experimentalPrimaryTeam.example": "E.g.: \"teamname\"",
|
"admin.experimental.experimentalPrimaryTeam.example": "E.g.: \"teamname\"",
|
||||||
"admin.experimental.experimentalPrimaryTeam.title": "Primary Team:",
|
"admin.experimental.experimentalPrimaryTeam.title": "Primary Team:",
|
||||||
"admin.experimental.experimentalUseNewSAMLLibrary.desc": "Enable an updated SAML Library, which does not require the XML Security Library (xmlsec1) to be installed. Warning: Not all providers have been tested. If you experience issues, please contact support: <linkSupport>https://mattermost.com/support/</linkSupport>. Changing this setting requires a server restart before taking effect.",
|
|
||||||
"admin.experimental.experimentalUseNewSAMLLibrary.title": "Use Improved SAML Library (Beta):",
|
|
||||||
"admin.experimental.ldapSettingsLoginButtonBorderColor.desc": "Specify the color of the AD/LDAP login button border for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
|
"admin.experimental.ldapSettingsLoginButtonBorderColor.desc": "Specify the color of the AD/LDAP login button border for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
|
||||||
"admin.experimental.ldapSettingsLoginButtonBorderColor.title": "AD/LDAP Login Button Border Color:",
|
"admin.experimental.ldapSettingsLoginButtonBorderColor.title": "AD/LDAP Login Button Border Color:",
|
||||||
"admin.experimental.ldapSettingsLoginButtonColor.desc": "Specify the color of the AD/LDAP login button for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
|
"admin.experimental.ldapSettingsLoginButtonColor.desc": "Specify the color of the AD/LDAP login button for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
|
||||||
|
@ -206,6 +206,7 @@
|
|||||||
"no-confusing-arrow": 2,
|
"no-confusing-arrow": 2,
|
||||||
"no-console": 2,
|
"no-console": 2,
|
||||||
"no-const-assign": 2,
|
"no-const-assign": 2,
|
||||||
|
"no-constant-binary-expression": 2,
|
||||||
"no-constant-condition": 2,
|
"no-constant-condition": 2,
|
||||||
"no-debugger": 2,
|
"no-debugger": 2,
|
||||||
"no-div-regex": 2,
|
"no-div-regex": 2,
|
||||||
|
Loading…
Reference in New Issue
Block a user