eslint-plugin-strict-dependencies
Advanced tools
Comparing version 1.2.4 to 1.3.0
{ | ||
"name": "eslint-plugin-strict-dependencies", | ||
"description": "ESlint plugin to define custom module dependency rules.", | ||
"version": "1.2.4", | ||
"version": "1.3.0", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -25,2 +25,5 @@ # eslint-plugin-strict-dependencies | ||
- Whether it can be imported by other files in the same directory | ||
- excludeTypeImportChecks: `boolean` | ||
- Whether to exclude type import checks | ||
- e.x. `import type { Suspense } from 'react'` | ||
@@ -79,3 +82,5 @@ ### Options | ||
// components/ui can import other components/ui | ||
"allowSameModule": true | ||
"allowSameModule": true, | ||
// components/ui exclude type import checks | ||
"excludeTypeImportChecks": true | ||
}, | ||
@@ -82,0 +87,0 @@ |
@@ -43,2 +43,5 @@ /* eslint-disable */ | ||
}, | ||
excludeTypeImportChecks: { | ||
type: 'boolean' | ||
} | ||
}, | ||
@@ -92,2 +95,4 @@ }, | ||
(dependency.allowSameModule && isMatch(relativeFilePath, dependency.module)) | ||
// または明示的に対象外としたtype importである場合 | ||
|| (dependency.excludeTypeImportChecks && node.importKind === 'type') | ||
@@ -94,0 +99,0 @@ if (isAllowedByPath) return |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11717
150
121