[MM-55455] Add "no-constant-binary-expression" eslint rule (#25410)

This commit is contained in:
M-ZubairAhmed 2023-11-20 12:04:20 +05:30 committed by GitHub
parent a9a879d00d
commit bbfb2f11bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 24 deletions

View File

@ -6942,27 +6942,6 @@ const AdminDefinition: AdminDefinitionType = {
placeholder_default: 'E.g.: "teamname"',
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',
key: 'SamlSettings.LoginButtonColor',

View File

@ -119,7 +119,7 @@ export function Menu(props: Props) {
if (isKeyPressed(event, Constants.KeyCodes.ENTER) || isKeyPressed(event, Constants.KeyCodes.SPACE)) {
const target = event.target as HTMLElement;
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) {
// Avoid closing the sub menu item on enter

View File

@ -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.example": "E.g.: \"teamname\"",
"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.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.",

View File

@ -206,6 +206,7 @@
"no-confusing-arrow": 2,
"no-console": 2,
"no-const-assign": 2,
"no-constant-binary-expression": 2,
"no-constant-condition": 2,
"no-debugger": 2,
"no-div-regex": 2,