@backstage/eslint-plugin
Advanced tools
Comparing version 0.0.0-nightly-20230214023046 to 0.0.0-nightly-20230218023213
# @backstage/eslint-plugin | ||
## 0.0.0-nightly-20230214023046 | ||
## 0.0.0-nightly-20230218023213 | ||
### Patch Changes | ||
- a061c466d6: Fixing a bug that we should check internal dependencies too | ||
## 0.1.0 | ||
### Minor Changes | ||
@@ -6,0 +12,0 @@ |
@@ -37,2 +37,3 @@ /* | ||
* @property {import('./getPackages').ExtendedPackage} package | ||
* @property {string} packageName | ||
*/ | ||
@@ -164,2 +165,3 @@ | ||
package: pkg, | ||
packageName, | ||
}); | ||
@@ -166,0 +168,0 @@ } |
{ | ||
"name": "@backstage/eslint-plugin", | ||
"description": "Backstage ESLint plugin", | ||
"version": "0.0.0-nightly-20230214023046", | ||
"version": "0.0.0-nightly-20230218023213", | ||
"publishConfig": { | ||
@@ -25,5 +25,5 @@ "access": "public" | ||
"devDependencies": { | ||
"@backstage/cli": "^0.0.0-nightly-20230214023046", | ||
"@backstage/cli": "^0.0.0-nightly-20230218023213", | ||
"eslint": "^8.33.0" | ||
} | ||
} |
@@ -154,7 +154,14 @@ /* | ||
return visitImports(context, (node, imp) => { | ||
if (imp.type !== 'external') { | ||
// 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; | ||
} | ||
// We leave checking of type imports to the repo-tools check | ||
if (imp.kind === 'type') { | ||
// We skip imports for the package itself | ||
if (imp.packageName === localPkg.packageJson.name) { | ||
return; | ||
@@ -161,0 +168,0 @@ } |
@@ -239,3 +239,14 @@ /* | ||
}, | ||
{ | ||
code: `import '@internal/foo'`, | ||
filename: joinPath(FIXTURE, 'packages/bar/src/index.ts'), | ||
errors: [ | ||
ERR_UNDECLARED( | ||
'@internal/foo', | ||
'dependencies', | ||
joinPath('packages', 'bar'), | ||
), | ||
], | ||
}, | ||
], | ||
}); |
39202
1045