From a4ebd513527c7c4f0674196eed680a01b2409afe Mon Sep 17 00:00:00 2001 From: drodil Date: Thu, 16 Feb 2023 09:21:08 +0200 Subject: [PATCH 01/12] fix: revert use graph API target url for access token Signed-off-by: drodil --- .changeset/eighty-geese-return.md | 5 +++++ .../src/microsoftGraph/client.test.ts | 2 +- .../src/microsoftGraph/client.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/eighty-geese-return.md diff --git a/.changeset/eighty-geese-return.md b/.changeset/eighty-geese-return.md new file mode 100644 index 0000000000..1f95e4843e --- /dev/null +++ b/.changeset/eighty-geese-return.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-msgraph': patch +--- + +revert ms graph token as it breaks the graph provider diff --git a/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.test.ts b/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.test.ts index f7d98f12c6..f621b4d924 100644 --- a/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.test.ts +++ b/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.test.ts @@ -53,7 +53,7 @@ describe('MicrosoftGraphClient', () => { expect(await response.json()).toEqual({ value: 'example' }); expect(tokenCredential.getToken).toHaveBeenCalledTimes(1); expect(tokenCredential.getToken).toHaveBeenCalledWith( - 'https://example.com/.default', + 'https://graph.microsoft.com/.default', ); }); diff --git a/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.ts b/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.ts index 7a685b258d..c644e545d6 100644 --- a/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.ts +++ b/plugins/catalog-backend-module-msgraph/src/microsoftGraph/client.ts @@ -219,7 +219,7 @@ export class MicrosoftGraphClient { ): Promise { // Make sure that we always have a valid access token (might be cached) const token = await this.tokenCredential.getToken( - `${this.baseUrl}/.default`, + 'https://graph.microsoft.com/.default', ); if (!token) { From e19c3ab15539c391ba50ac9ccc90c6a5db00fd09 Mon Sep 17 00:00:00 2001 From: Ben Lambert Date: Thu, 16 Feb 2023 20:04:09 +0100 Subject: [PATCH 02/12] Update eighty-geese-return.md Signed-off-by: Ben Lambert --- .changeset/eighty-geese-return.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/eighty-geese-return.md b/.changeset/eighty-geese-return.md index 1f95e4843e..49361de8e7 100644 --- a/.changeset/eighty-geese-return.md +++ b/.changeset/eighty-geese-return.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-backend-module-msgraph': patch --- -revert ms graph token as it breaks the graph provider +Revert using `baseUrl` for MS Graph provider as it breaks token retrieval From e3e2c57272e5f7a955d9ff0ce23ebb8e760591bc Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 11:11:53 +0100 Subject: [PATCH 03/12] chore: moving `@alpha` types to `@public` Signed-off-by: blam --- plugins/sonarqube-react/api-report.md | 14 +++++++------- plugins/sonarqube-react/src/api/SonarQubeApi.ts | 12 ++++++------ .../sonarqube-react/src/hooks/useProjectInfo.ts | 2 +- plugins/sonarqube/api-report.md | 2 +- plugins/sonarqube/src/api/SonarQubeClient.ts | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/sonarqube-react/api-report.md b/plugins/sonarqube-react/api-report.md index be84c45cce..6ffa98915b 100644 --- a/plugins/sonarqube-react/api-report.md +++ b/plugins/sonarqube-react/api-report.md @@ -6,7 +6,7 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; -// @alpha (undocumented) +// @public (undocumented) export interface FindingSummary { // (undocumented) getComponentMeasuresUrl: SonarUrlProcessorFunc; @@ -25,7 +25,7 @@ export interface FindingSummary { // @public (undocumented) export const isSonarQubeAvailable: (entity: Entity) => boolean; -// @alpha (undocumented) +// @public (undocumented) export type MetricKey = | 'alert_status' | 'bugs' @@ -39,7 +39,7 @@ export type MetricKey = | 'coverage' | 'duplicated_lines_density'; -// @alpha +// @public export type Metrics = { [key in MetricKey]: string | undefined; }; @@ -47,7 +47,7 @@ export type Metrics = { // @public (undocumented) export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key'; -// @alpha (undocumented) +// @public (undocumented) export type SonarQubeApi = { getFindingSummary(options: { componentKey?: string; @@ -55,13 +55,13 @@ export type SonarQubeApi = { }): Promise; }; -// @alpha (undocumented) +// @public (undocumented) export const sonarQubeApiRef: ApiRef; -// @alpha (undocumented) +// @public (undocumented) export type SonarUrlProcessorFunc = (identifier: string) => string; -// @alpha +// @public export const useProjectInfo: (entity: Entity) => { projectInstance: string | undefined; projectKey: string | undefined; diff --git a/plugins/sonarqube-react/src/api/SonarQubeApi.ts b/plugins/sonarqube-react/src/api/SonarQubeApi.ts index ee6b1bb6a3..13517d97fe 100644 --- a/plugins/sonarqube-react/src/api/SonarQubeApi.ts +++ b/plugins/sonarqube-react/src/api/SonarQubeApi.ts @@ -16,7 +16,7 @@ import { createApiRef } from '@backstage/core-plugin-api'; -/** @alpha */ +/** @public */ export type MetricKey = // alert status | 'alert_status' @@ -43,11 +43,11 @@ export type MetricKey = // duplicated lines | 'duplicated_lines_density'; -/** @alpha */ +/** @public */ export type SonarUrlProcessorFunc = (identifier: string) => string; /** - * @alpha + * @public * * Define a type to make sure that all metrics are used */ @@ -55,7 +55,7 @@ export type Metrics = { [key in MetricKey]: string | undefined; }; -/** @alpha */ +/** @public */ export interface FindingSummary { lastAnalysis: string; metrics: Metrics; @@ -65,12 +65,12 @@ export interface FindingSummary { getSecurityHotspotsUrl: () => string; } -/** @alpha */ +/** @public */ export const sonarQubeApiRef = createApiRef({ id: 'plugin.sonarqube.service', }); -/** @alpha */ +/** @public */ export type SonarQubeApi = { getFindingSummary(options: { componentKey?: string; diff --git a/plugins/sonarqube-react/src/hooks/useProjectInfo.ts b/plugins/sonarqube-react/src/hooks/useProjectInfo.ts index 119e568e46..3336bd1805 100644 --- a/plugins/sonarqube-react/src/hooks/useProjectInfo.ts +++ b/plugins/sonarqube-react/src/hooks/useProjectInfo.ts @@ -25,7 +25,7 @@ export const SONARQUBE_PROJECT_INSTANCE_SEPARATOR = '/'; * * If part or all info are not found, they will default to undefined * - * @alpha + * @public * @param entity - entity to find the sonarqube information from. * @returns a ProjectInfo properly populated. */ diff --git a/plugins/sonarqube/api-report.md b/plugins/sonarqube/api-report.md index f77c66ac59..db3f38e31d 100644 --- a/plugins/sonarqube/api-report.md +++ b/plugins/sonarqube/api-report.md @@ -42,7 +42,7 @@ export const SonarQubeCard: (props: { duplicationRatings?: DuplicationRating[]; }) => JSX.Element; -// @alpha (undocumented) +// @public (undocumented) export class SonarQubeClient implements SonarQubeApi { constructor({ discoveryApi, diff --git a/plugins/sonarqube/src/api/SonarQubeClient.ts b/plugins/sonarqube/src/api/SonarQubeClient.ts index f742fe026f..14c7936e92 100644 --- a/plugins/sonarqube/src/api/SonarQubeClient.ts +++ b/plugins/sonarqube/src/api/SonarQubeClient.ts @@ -23,7 +23,7 @@ import { import { InstanceUrlWrapper, FindingsWrapper } from './types'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; -/** @alpha */ +/** @public */ export class SonarQubeClient implements SonarQubeApi { discoveryApi: DiscoveryApi; identityApi: IdentityApi; From 8ae65a0bc1d7c12659dba62e2fbb293e7705e556 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 11:15:08 +0100 Subject: [PATCH 04/12] chore: changeset Signed-off-by: blam --- .changeset/swift-bags-wave.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/swift-bags-wave.md diff --git a/.changeset/swift-bags-wave.md b/.changeset/swift-bags-wave.md new file mode 100644 index 0000000000..8f57c7f89b --- /dev/null +++ b/.changeset/swift-bags-wave.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-sonarqube-react': patch +'@backstage/plugin-sonarqube': patch +--- + +Moved imports from `/alpha` to main public exports. From a3576a386ed3af37d84345f8c3518ada5990f24b Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 09:21:34 +0100 Subject: [PATCH 05/12] chore: fixing the eslint rule Signed-off-by: blam --- packages/eslint-plugin/lib/visitImports.js | 2 ++ .../eslint-plugin/rules/no-undeclared-imports.js | 12 +++++++----- .../eslint-plugin/src/no-undeclared-imports.test.ts | 11 +++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/lib/visitImports.js b/packages/eslint-plugin/lib/visitImports.js index 43401bf5f9..1a344c1101 100644 --- a/packages/eslint-plugin/lib/visitImports.js +++ b/packages/eslint-plugin/lib/visitImports.js @@ -34,6 +34,7 @@ const getPackages = require('./getPackages'); * @property {'value' | 'type'} kind * @property {string} path * @property {import('./getPackages').ExtendedPackage} package + * @property {string} packageName */ /** @@ -160,6 +161,7 @@ module.exports = function visitImports(context, visitor) { kind: info.kind, path: subPath, package: pkg, + packageName, }); } diff --git a/packages/eslint-plugin/rules/no-undeclared-imports.js b/packages/eslint-plugin/rules/no-undeclared-imports.js index 42624beb5c..c86792b933 100644 --- a/packages/eslint-plugin/rules/no-undeclared-imports.js +++ b/packages/eslint-plugin/rules/no-undeclared-imports.js @@ -151,11 +151,13 @@ module.exports = { } return visitImports(context, (node, imp) => { - if (imp.type !== 'external') { - return; - } - // We leave checking of type imports to the repo-tools check - if (imp.kind === 'type') { + // We leave checking of type imports to the repo-tools check, + // and we skip builtins and local imports + if ( + imp.kind === 'type' || + imp.type === 'builtin' || + imp.type === 'local' + ) { return; } diff --git a/packages/eslint-plugin/src/no-undeclared-imports.test.ts b/packages/eslint-plugin/src/no-undeclared-imports.test.ts index 1b5cbee853..78844899ba 100644 --- a/packages/eslint-plugin/src/no-undeclared-imports.test.ts +++ b/packages/eslint-plugin/src/no-undeclared-imports.test.ts @@ -236,5 +236,16 @@ ruleTester.run(RULE, rule, { ), ], }, + { + code: `import '@internal/foo'`, + filename: joinPath(FIXTURE, 'packages/bar/src/index.ts'), + errors: [ + ERR_UNDECLARED( + '@internal/foo', + 'dependencies', + joinPath('packages', 'bar'), + ), + ], + }, ], }); From a061c466d665dfed8383ff06a7417cba3398802c Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 09:22:53 +0100 Subject: [PATCH 06/12] chore: add changeset Signed-off-by: blam --- .changeset/gentle-pears-clean.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/gentle-pears-clean.md diff --git a/.changeset/gentle-pears-clean.md b/.changeset/gentle-pears-clean.md new file mode 100644 index 0000000000..d92c3709ae --- /dev/null +++ b/.changeset/gentle-pears-clean.md @@ -0,0 +1,5 @@ +--- +'@backstage/eslint-plugin': patch +--- + +Fixing a bug that we should check internal dependencies too From f85b1001238c1db2f3c1e5962377d5cd79a88af8 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 10:42:18 +0100 Subject: [PATCH 07/12] chore: fix missing deps Signed-off-by: blam --- packages/e2e-test/package.json | 1 + plugins/auth-backend/package.json | 1 + .../catalog-backend-module-aws/package.json | 2 + .../package.json | 1 + .../src/run.ts | 47 ++++++++++++------- .../src/service/standaloneApplication.ts | 4 ++ 6 files changed, 38 insertions(+), 18 deletions(-) diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index ee447a1736..39cc84cb14 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -27,6 +27,7 @@ }, "bin": "bin/e2e-test", "dependencies": { + "@backstage/create-app": "workspace:^", "@backstage/cli-common": "workspace:^", "@backstage/errors": "workspace:^", "chalk": "^4.0.0", diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 3481ae2714..dee7f6e442 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -78,6 +78,7 @@ "devDependencies": { "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", + "@backstage/test-utils": "workspace:^", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index 4082a4f83b..f583d64792 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -41,7 +41,9 @@ "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", "@backstage/plugin-catalog-backend": "workspace:^", + "@backstage/plugin-catalog-common": "workspace:^", "@backstage/plugin-catalog-node": "workspace:^", + "@backstage/plugin-kubernetes-common": "workspace:^", "@backstage/types": "workspace:^", "aws-sdk": "^2.840.0", "lodash": "^4.17.21", diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index 9a09ea6ca2..ff8272e29e 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-defaults": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/backend-tasks": "workspace:^", "@backstage/catalog-model": "workspace:^", diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/run.ts b/plugins/catalog-backend-module-incremental-ingestion/src/run.ts index e9cc7dbb2a..eb66140fe2 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/run.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/run.ts @@ -13,8 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { coreServices } from '@backstage/backend-plugin-api'; -import { startTestBackend } from '@backstage/backend-test-utils'; +import { createBackend } from '@backstage/backend-defaults'; +import { + coreServices, + createServiceFactory, +} from '@backstage/backend-plugin-api'; import { ConfigReader } from '@backstage/config'; import { catalogPlugin } from '@backstage/plugin-catalog-backend'; import { @@ -46,25 +49,33 @@ async function main() { }, }; - await startTestBackend({ - services: [[coreServices.config, new ConfigReader(config)]], - extensionPoints: [], - features: [ - catalogPlugin(), - incrementalIngestionEntityProviderCatalogModule({ - providers: [ - { - provider: provider, - options: { - burstInterval: { seconds: 1 }, - burstLength: { seconds: 10 }, - restLength: { seconds: 10 }, - }, - }, - ], + const backend = createBackend({ + services: [ + createServiceFactory({ + service: coreServices.config, + deps: {}, + factory: () => new ConfigReader(config), }), ], }); + + backend.add(catalogPlugin()); + backend.add( + incrementalIngestionEntityProviderCatalogModule({ + providers: [ + { + provider: provider, + options: { + burstInterval: { seconds: 1 }, + burstLength: { seconds: 10 }, + restLength: { seconds: 10 }, + }, + }, + ], + }), + ); + + await backend.start(); } main().catch(error => { diff --git a/plugins/vault-backend/src/service/standaloneApplication.ts b/plugins/vault-backend/src/service/standaloneApplication.ts index bcec8ca419..ba4c0edc3e 100644 --- a/plugins/vault-backend/src/service/standaloneApplication.ts +++ b/plugins/vault-backend/src/service/standaloneApplication.ts @@ -28,6 +28,10 @@ import helmet from 'helmet'; import { Logger } from 'winston'; import { createRouter } from './router'; import { ConfigReader } from '@backstage/config'; + +// Think this file will probably go away once we move to backend system +// And restructure into the /dev folder +// eslint-disable-next-line @backstage/no-undeclared-imports import { TestDatabases } from '@backstage/backend-test-utils'; import { TaskScheduler } from '@backstage/backend-tasks'; From bf611cf019a091775ae484eb6e1377b9c5a71254 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 10:43:09 +0100 Subject: [PATCH 08/12] chore: added changesets Signed-off-by: blam --- .changeset/spotty-bees-tell.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/spotty-bees-tell.md diff --git a/.changeset/spotty-bees-tell.md b/.changeset/spotty-bees-tell.md new file mode 100644 index 0000000000..5267d8a6a0 --- /dev/null +++ b/.changeset/spotty-bees-tell.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch +'@backstage/plugin-catalog-backend-module-aws': patch +--- + +Fix missing `dependencies` in `package.json` From e24851b4facf2458d845b20a0adf39d7703420f0 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 10:57:18 +0100 Subject: [PATCH 09/12] chore: added mock node_modules for resolution Signed-off-by: blam --- .../node_modules/@internal/foo/index.js | 0 .../node_modules/@internal/foo/package.json | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/index.js create mode 100644 packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/package.json diff --git a/packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/index.js b/packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/index.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/package.json b/packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/package.json new file mode 100644 index 0000000000..c15a2c1718 --- /dev/null +++ b/packages/eslint-plugin/src/__fixtures__/monorepo/packages/node_modules/@internal/foo/package.json @@ -0,0 +1,17 @@ +{ + "name": "@internal/foo", + "main": "index.js", + "dependencies": { + "@internal/bar": "1.0.0" + }, + "devDependencies": { + "lodash": "*" + }, + "peerDependencies": { + "react": "*" + }, + "files": [ + "dist", + "type-utils" + ] +} From b37fa77b00feacbe9f7e38ee4e3acbbee4e510f8 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 11:02:09 +0100 Subject: [PATCH 10/12] chore: fixing yarn.lock Signed-off-by: blam --- packages/e2e-test/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 39cc84cb14..718f8fd079 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -27,8 +27,8 @@ }, "bin": "bin/e2e-test", "dependencies": { - "@backstage/create-app": "workspace:^", "@backstage/cli-common": "workspace:^", + "@backstage/create-app": "workspace:^", "@backstage/errors": "workspace:^", "chalk": "^4.0.0", "commander": "^9.1.0", diff --git a/yarn.lock b/yarn.lock index 550c230ba3..7d905a0873 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3964,7 +3964,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/create-app@workspace:*, @backstage/create-app@workspace:packages/create-app": +"@backstage/create-app@workspace:*, @backstage/create-app@workspace:^, @backstage/create-app@workspace:packages/create-app": version: 0.0.0-use.local resolution: "@backstage/create-app@workspace:packages/create-app" dependencies: @@ -4438,6 +4438,7 @@ __metadata: "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" "@backstage/plugin-auth-node": "workspace:^" + "@backstage/test-utils": "workspace:^" "@backstage/types": "workspace:^" "@davidzemon/passport-okta-oauth": ^0.0.5 "@google-cloud/firestore": ^6.0.0 @@ -4795,7 +4796,9 @@ __metadata: "@backstage/errors": "workspace:^" "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" + "@backstage/plugin-catalog-common": "workspace:^" "@backstage/plugin-catalog-node": "workspace:^" + "@backstage/plugin-kubernetes-common": "workspace:^" "@backstage/types": "workspace:^" "@types/lodash": ^4.14.151 aws-sdk: ^2.840.0 @@ -4997,6 +5000,7 @@ __metadata: dependencies: "@backstage/backend-app-api": "workspace:^" "@backstage/backend-common": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-tasks": "workspace:^" "@backstage/backend-test-utils": "workspace:^" @@ -21023,6 +21027,7 @@ __metadata: dependencies: "@backstage/cli": "workspace:^" "@backstage/cli-common": "workspace:^" + "@backstage/create-app": "workspace:^" "@backstage/errors": "workspace:^" "@types/fs-extra": ^9.0.1 "@types/node": ^16.11.26 From b22d090dda148f47aba18fa74742fe3af91e900b Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 11:41:02 +0100 Subject: [PATCH 11/12] chore: skip imports for the package itself, this works as expected in node Signed-off-by: blam --- packages/eslint-plugin/rules/no-undeclared-imports.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/eslint-plugin/rules/no-undeclared-imports.js b/packages/eslint-plugin/rules/no-undeclared-imports.js index c86792b933..b1e11d1b97 100644 --- a/packages/eslint-plugin/rules/no-undeclared-imports.js +++ b/packages/eslint-plugin/rules/no-undeclared-imports.js @@ -161,6 +161,11 @@ module.exports = { return; } + // We skip imports for the package itself + if (imp.packageName === localPkg.packageJson.name) { + return; + } + const modulePath = path.relative(localPkg.dir, filePath); const expectedType = getExpectedDepType( localPkg.packageJson, From 66b3a3956b82ad7bdd5b1c6334a1d94d32f94eab Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 12:09:26 +0100 Subject: [PATCH 12/12] chore: changeset Signed-off-by: blam --- .changeset/polite-chicken-do.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/polite-chicken-do.md diff --git a/.changeset/polite-chicken-do.md b/.changeset/polite-chicken-do.md new file mode 100644 index 0000000000..33e4149253 --- /dev/null +++ b/.changeset/polite-chicken-do.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-vault-backend': patch +--- + +Ignore the `eslint` error