Merge pull request #33359 from awanlin/topic/typos-cli

Added `typos` to CI and fixed all findings
This commit is contained in:
Andre Wanlin
2026-05-25 15:23:38 -05:00
committed by GitHub
29 changed files with 186 additions and 55 deletions
@@ -5,7 +5,7 @@
```ts
import { AwsCredentialsManager } from '@backstage/integration-aws-node';
import { AwsS3Integration } from '@backstage/integration';
import { AzureBlobStorageIntergation } from '@backstage/integration';
import { AzureBlobStorageIntegration } from '@backstage/integration';
import { AzureCredentialsManager } from '@backstage/integration';
import { AzureDevOpsCredentialsProvider } from '@backstage/integration';
import { AzureIntegration } from '@backstage/integration';
@@ -67,7 +67,7 @@ export class AwsS3UrlReader implements UrlReaderService {
export class AzureBlobStorageUrlReader implements UrlReaderService {
constructor(
credsManager: AzureCredentialsManager,
integration: AzureBlobStorageIntergation,
integration: AzureBlobStorageIntegration,
deps: {
treeResponseFactory: ReadTreeResponseFactory;
},
@@ -26,7 +26,7 @@ import { Readable } from 'node:stream';
import { relative } from 'node:path/posix';
import { ReadUrlResponseFactory } from './ReadUrlResponseFactory';
import {
AzureBlobStorageIntergation,
AzureBlobStorageIntegration,
AzureCredentialsManager,
DefaultAzureCredentialsManager,
ScmIntegrations,
@@ -88,14 +88,14 @@ export class AzureBlobStorageUrlReader implements UrlReaderService {
// private readonly blobServiceClient: BlobServiceClient;
private readonly credsManager: AzureCredentialsManager;
private readonly integration: AzureBlobStorageIntergation;
private readonly integration: AzureBlobStorageIntegration;
private readonly deps: {
treeResponseFactory: ReadTreeResponseFactory;
};
constructor(
credsManager: AzureCredentialsManager,
integration: AzureBlobStorageIntergation,
integration: AzureBlobStorageIntegration,
deps: {
treeResponseFactory: ReadTreeResponseFactory;
},
+9 -1
View File
@@ -1547,7 +1547,15 @@ export type TableFilter = {
// Warning: (ae-missing-release-tag) "TableFiltersClassKey" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type TableFiltersClassKey = 'root' | 'value' | 'heder' | 'filters';
export type TableFiltersClassKey =
| 'root'
| 'value'
| 'header'
/**
* @deprecated Use `'header'` instead. This was a typo in the original class key.
*/
| 'heder'
| 'filters';
// Warning: (ae-missing-release-tag) "TableHeaderClassKey" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -24,7 +24,15 @@ import { SelectProps } from '../Select/Select';
import { coreComponentsTranslationRef } from '../../translation';
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
export type TableFiltersClassKey = 'root' | 'value' | 'heder' | 'filters';
export type TableFiltersClassKey =
| 'root'
| 'value'
| 'header'
/**
* @deprecated Use `'header'` instead. This was a typo in the original class key.
*/
| 'heder'
| 'filters';
const useFilterStyles = makeStyles(
theme => ({
@@ -46,6 +54,13 @@ const useFilterStyles = makeStyles(
justifyContent: 'space-between',
borderBottom: `1px solid ${theme.palette.grey[500]}`,
},
// Intentionally empty: the deprecated `heder` class is still applied to
// the same element as `header` so legacy theme overrides on
// `BackstageTableFilters.heder` continue to work. Keeping this rule empty
// (rather than duplicating `header`'s styles) avoids clobbering overrides
// on the canonical `header` key — JSS injects rules in key order, so an
// empty `heder` defined after `header` has no properties to override.
heder: {},
filters: {
display: 'flex',
flexDirection: 'column',
@@ -98,7 +113,7 @@ export const Filters = (props: Props) => {
// As material table doesn't provide a way to add a column filter tab we will make our own filter logic
return (
<Box className={classes.root}>
<Box className={classes.header}>
<Box className={`${classes.header} ${classes.heder}`}>
<Box className={classes.value}>{t('table.filter.title')}</Box>
<Button color="primary" onClick={handleClick}>
{t('table.filter.clearAll')}
+29 -23
View File
@@ -73,6 +73,27 @@ export type AwsS3IntegrationConfig = {
externalId?: string;
};
// @public
export class AzureBlobStorageIntegration implements ScmIntegration {
constructor(integrationConfig: AzureBlobStorageIntegrationConfig);
// (undocumented)
get config(): AzureBlobStorageIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<AzureBlobStorageIntegration>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number | undefined;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public
export type AzureBlobStorageIntegrationConfig = {
accountName?: string;
@@ -89,26 +110,11 @@ export type AzureBlobStorageIntegrationConfig = {
};
};
// @public
export class AzureBlobStorageIntergation implements ScmIntegration {
constructor(integrationConfig: AzureBlobStorageIntegrationConfig);
// (undocumented)
get config(): AzureBlobStorageIntegrationConfig;
// (undocumented)
static factory: ScmIntegrationsFactory<AzureBlobStorageIntergation>;
// (undocumented)
resolveEditUrl(url: string): string;
// (undocumented)
resolveUrl(options: {
url: string;
base: string;
lineNumber?: number | undefined;
}): string;
// (undocumented)
get title(): string;
// (undocumented)
get type(): string;
}
// @public @deprecated
export const AzureBlobStorageIntergation: typeof AzureBlobStorageIntegration;
// @public @deprecated
export type AzureBlobStorageIntergation = AzureBlobStorageIntegration;
// @public
export type AzureClientSecretCredential = AzureCredentialBase & {
@@ -771,7 +777,7 @@ export interface IntegrationsByType {
// (undocumented)
azure: ScmIntegrationsGroup<AzureIntegration>;
// (undocumented)
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntegration>;
// (undocumented)
bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
// (undocumented)
@@ -980,7 +986,7 @@ export interface ScmIntegrationRegistry
// (undocumented)
azure: ScmIntegrationsGroup<AzureIntegration>;
// (undocumented)
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntegration>;
// (undocumented)
bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
// (undocumented)
@@ -1013,7 +1019,7 @@ export class ScmIntegrations implements ScmIntegrationRegistry {
// (undocumented)
get azure(): ScmIntegrationsGroup<AzureIntegration>;
// (undocumented)
get azureBlobStorage(): ScmIntegrationsGroup<AzureBlobStorageIntergation>;
get azureBlobStorage(): ScmIntegrationsGroup<AzureBlobStorageIntegration>;
// (undocumented)
get bitbucketCloud(): ScmIntegrationsGroup<BitbucketCloudIntegration>;
// (undocumented)
@@ -39,7 +39,7 @@ import { AwsCodeCommitIntegrationConfig } from './awsCodeCommit';
import { HarnessIntegration, HarnessIntegrationConfig } from './harness';
import {
AzureBlobStorageIntegrationConfig,
AzureBlobStorageIntergation,
AzureBlobStorageIntegration,
} from './azureBlobStorage';
import { GoogleGcsIntegration, GoogleGcsIntegrationConfig } from './googleGcs';
@@ -56,7 +56,7 @@ describe('ScmIntegrations', () => {
host: 'azure.local',
} as AzureIntegrationConfig);
const azureBlob = new AzureBlobStorageIntergation({
const azureBlob = new AzureBlobStorageIntegration({
host: 'azureblobstorage.local',
} as AzureBlobStorageIntegrationConfig);
+4 -4
View File
@@ -28,7 +28,7 @@ import { ScmIntegration, ScmIntegrationsGroup } from './types';
import { ScmIntegrationRegistry } from './registry';
import { GiteaIntegration } from './gitea';
import { HarnessIntegration } from './harness/HarnessIntegration';
import { AzureBlobStorageIntergation } from './azureBlobStorage';
import { AzureBlobStorageIntegration } from './azureBlobStorage';
import { GoogleGcsIntegration } from './googleGcs/GoogleGcsIntegration';
/**
@@ -39,7 +39,7 @@ import { GoogleGcsIntegration } from './googleGcs/GoogleGcsIntegration';
export interface IntegrationsByType {
awsS3: ScmIntegrationsGroup<AwsS3Integration>;
awsCodeCommit: ScmIntegrationsGroup<AwsCodeCommitIntegration>;
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntegration>;
azure: ScmIntegrationsGroup<AzureIntegration>;
bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
@@ -63,7 +63,7 @@ export class ScmIntegrations implements ScmIntegrationRegistry {
return new ScmIntegrations({
awsS3: AwsS3Integration.factory({ config }),
awsCodeCommit: AwsCodeCommitIntegration.factory({ config }),
azureBlobStorage: AzureBlobStorageIntergation.factory({ config }),
azureBlobStorage: AzureBlobStorageIntegration.factory({ config }),
azure: AzureIntegration.factory({ config }),
bitbucketCloud: BitbucketCloudIntegration.factory({ config }),
bitbucketServer: BitbucketServerIntegration.factory({ config }),
@@ -88,7 +88,7 @@ export class ScmIntegrations implements ScmIntegrationRegistry {
return this.byType.awsCodeCommit;
}
get azureBlobStorage(): ScmIntegrationsGroup<AzureBlobStorageIntergation> {
get azureBlobStorage(): ScmIntegrationsGroup<AzureBlobStorageIntegration> {
return this.byType.azureBlobStorage;
}
@@ -15,11 +15,11 @@
*/
import { ConfigReader } from '@backstage/config';
import { AzureBlobStorageIntergation } from './AzureBlobStorageIntegration';
import { AzureBlobStorageIntegration } from './AzureBlobStorageIntegration';
describe('AzureBlobStorageIntegration', () => {
it('has a working factory', () => {
const integrations = AzureBlobStorageIntergation.factory({
const integrations = AzureBlobStorageIntegration.factory({
config: new ConfigReader({
integrations: {
azureBlobStorage: [
@@ -40,7 +40,7 @@ describe('AzureBlobStorageIntegration', () => {
});
it('returns the basics', () => {
const integration = new AzureBlobStorageIntergation({
const integration = new AzureBlobStorageIntegration({
host: 'myaccount.blob.core.windows.net',
} as any);
expect(integration.type).toBe('azureBlobStorage');
@@ -49,7 +49,7 @@ describe('AzureBlobStorageIntegration', () => {
describe('resolveUrl', () => {
it('works for valid URLs', () => {
const integration = new AzureBlobStorageIntergation({
const integration = new AzureBlobStorageIntegration({
host: 'blob.core.windows.net',
} as any);
@@ -63,7 +63,7 @@ describe('AzureBlobStorageIntegration', () => {
});
it('resolve edit URL', () => {
const integration = new AzureBlobStorageIntergation({
const integration = new AzureBlobStorageIntegration({
host: 'myaccount.blob.core.windows.net',
} as any);
@@ -26,15 +26,15 @@ import {
*
* @public
*/
export class AzureBlobStorageIntergation implements ScmIntegration {
static factory: ScmIntegrationsFactory<AzureBlobStorageIntergation> = ({
export class AzureBlobStorageIntegration implements ScmIntegration {
static factory: ScmIntegrationsFactory<AzureBlobStorageIntegration> = ({
config,
}) => {
const configs = readAzureBlobStorageIntegrationConfigs(
config.getOptionalConfigArray('integrations.azureBlobStorage') ?? [],
);
return basicIntegrations(
configs.map(c => new AzureBlobStorageIntergation(c)),
configs.map(c => new AzureBlobStorageIntegration(c)),
i => i.config.host,
);
};
@@ -69,3 +69,20 @@ export class AzureBlobStorageIntergation implements ScmIntegration {
return url;
}
}
/**
* Microsoft Azure Blob storage based integration.
*
* @public
* @deprecated Use {@link AzureBlobStorageIntegration} instead. This was a typo in the original class name.
*/
export const AzureBlobStorageIntergation = AzureBlobStorageIntegration;
/**
* Microsoft Azure Blob storage based integration.
*
* @public
* @deprecated Use {@link AzureBlobStorageIntegration} instead. This was a typo in the original class name.
*/
// eslint-disable-next-line @typescript-eslint/no-redeclare
export type AzureBlobStorageIntergation = AzureBlobStorageIntegration;
@@ -13,7 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { AzureBlobStorageIntergation } from './AzureBlobStorageIntegration';
export {
AzureBlobStorageIntegration,
AzureBlobStorageIntergation,
} from './AzureBlobStorageIntegration';
export {
readAzureBlobStorageIntegrationConfig,
readAzureBlobStorageIntegrationConfigs,
@@ -496,7 +496,7 @@ describe('parseRetryAfterMs', () => {
expect(parseRetryAfterMs(pastDate, 5000)).toBe(0);
});
it('returns fallback for null or unparseable values', () => {
it('returns fallback for null or unparsable values', () => {
expect(parseRetryAfterMs(null, 5000)).toBe(5000);
expect(parseRetryAfterMs('', 5000)).toBe(5000);
expect(parseRetryAfterMs('not-a-date-or-number', 5000)).toBe(5000);
+2 -2
View File
@@ -25,7 +25,7 @@ import { GithubIntegration } from './github/GithubIntegration';
import { GitLabIntegration } from './gitlab/GitLabIntegration';
import { GiteaIntegration } from './gitea/GiteaIntegration';
import { HarnessIntegration } from './harness/HarnessIntegration';
import { AzureBlobStorageIntergation } from './azureBlobStorage';
import { AzureBlobStorageIntegration } from './azureBlobStorage';
/**
* Holds all registered SCM integrations, of all types.
@@ -36,7 +36,7 @@ export interface ScmIntegrationRegistry
extends ScmIntegrationsGroup<ScmIntegration> {
awsS3: ScmIntegrationsGroup<AwsS3Integration>;
awsCodeCommit: ScmIntegrationsGroup<AwsCodeCommitIntegration>;
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntegration>;
azure: ScmIntegrationsGroup<AzureIntegration>;
bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;