All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- fix(#340): Fix bug producing that target option had captured values from the target dependency when templating
${from}
property (@DeyLak)
- feat(#329): Modify dependencies, tests and docs to support eslint v9
- chore(#338): Bump micromatch dependency to 4.0.8
- docs: Clarify include/exclude precedence in docs (@robw-mercury)
- chore: Add changes from release 4.2.2
- chore(#334): Remove is-core-module dependency (@wojtekmaj)
- chore(dependencies): Bump micromatch to 4.0.7
- chore(devDependencies): Bum @typescript-eslint/eslint-plugin" to 7.15.0
- chore(devDependencies): Bump @typescript-eslint/parser to 7.15.0
- chore(devDependencies): Bump eslint to 8.57.0
- chore(devDependencies): Bump eslint-plugin-local-rules to 3.0.2
- chore(devDependencies): Bump lint-staged to 15.2.7
- chore(devDependencies): Bump mindsers/changelog-reader-action action to v2.2.3
- chore(devDependencies): Bumb prettier to 3.3.2
- chore(devDependencies): Bump EndBug/version-check action to v2.1.4
- feat: Modify dependencies and tests to support eslint v9
- feat: Remove
plugins
property from preset configurations, given that eslint v9 does not support defining plugins by using strings in the configuration. Added example to the main readme file to show how the plugin and predefined configurations should be used now. - chore: Migrate self eslint configuration to v9 format.
- chore: Drop support for Node.js versions lower than 18.18
- chore: Bump eslint-module-utils to 2.8.1
- chore: Update devDependencies
- chore: Upgrade Node.js versions used in pipelines. Remove Node.js 16.x. Add Node.js 22.x
- chore: Bump actions/cache to v4
- chore: Bump actions/upload-artifact to v4
- chore: Bump actions/download-artifact to v4
- feat: Add
require
dependency node, enabling to analyze dependencies inrequire(...)
calls - chore: Lint code using eslint-plugin-boundaries in its own codebase
- feat(#323): Specify which element type has issues during settings validation (Thanks to @hmnzr)
- fix: Avoid error when rule element matchers define a capture key but some element does not have that capture key
- feat(#213): Add
dependency-nodes
setting to allow analyzing dependencies from additional nodes, such as exports or dynamic imports. (@gridsane) - feat: Add
additional-dependency-nodes
setting to add custom dependency nodes to the default ones. For example, you could enable to analyze dependencies injest.mock(...)
, etc. (@gridsane)
- fix: Fixed the error position in multiline imports. See "how to migrate from v3 to v4" guide.
- chore(deps): Update dependencies
- feat(#296): Add
root-path
setting to allow defining the root path of the project. It is useful when executing the eslint command from a different folder than the project root.
- feat(#298): Add
importKind
option toelement-types
,entry-point
andexternal
rules. It allows to define if the rule applies when the dependency is being imported as a value or as a type. - chore: Add meta name and version to plugin exported object
- chore: Handle concurrency in pipelines
- fix(#295): Replace template values in custom messages using a Regexp, so it replaces all occurrences
- fix: Do not throw error when rule contains matchers for captured values but element has not captured values
- chore(deps): Update dependencies
- chore(deps): Use NodeJs 16.x, 18.x and 20.x in pipelines
- refactor: Use optional chain expressions
- feat(#297): Support matching imported external module path in
external
rule using micromatch patterns
- chore(deps): Update dependencies
- feat(#243): Support templates in rules main matchers.
${from.X}
and${target.X}
templates are replaced by corresponding captured values - feat: Add aliases
from
(file) andtarget
(dependency) to custom messages templates
- chore(deps): Update dependencies
- fix(#260): Avoid wrong caches in external dependencies. Use the dependency source as cache key in that case.
- chore: Fix check-package-version action
- chore(deps): Drop support for Node.js 12.x
- chore(deps): Update devDependencies
- chore(renovate): Avoid upgrading chalk to v5
- chore(deps): Drop support for Node.js 12.x. (Affects only to dev scripts)
- docs: Fix typo in readme
- refactor: Fix Sonar smells
- chore(): Run tests also using Node.js v18.x
- chore(deps): Update dependencies
- chore(deps): Update devDependencies
- feat(#170): Support custom messages in
no-external
rule config
- docs: Minor changes to contributing guidelines
- chore(deps): Update devDependencies
- feat(#171): Support custom messages in
no-private
rule config
- feat(#169): Support custom messages in
entry-point
rule config
- docs: Fix some typos and links in
element-types
rule docs
- chore(deps): Update devDependencies
- feat(#87): Support custom messages in
element-types
rule config
- feat(#87): Add context about the specific rule forbidding the import to the
element-types
error message. Add information about file and dependency when import is forbidden due to the default configuration. - refactor: Add isArray and isString utils
- chore(deps): Support any eslint version greater than 6.x in peerDependencies
- fix: Support array of micromatch patterns when replacing captured values
- docs: Fix broken links
- feat: Remove cache traces from debug mode
- docs(#160): Fix links to debug mode section
- fix(#133): Remove plugin namespace from rules documentation links
- fix(#133): no-private rule had undefined name
- docs: Remove npm dependencies badge because david-dm site is down
- chore(deps): Update devDependencies
- chore(deps): Support any NodeJs version greater than 12.x. Run tests also with NodeJS 17. Use NodeJS 16 in publish pipelines
- docs(#107): Add usage with TypeScript docs
- chore(deps): Update devDependencies
- fix: Remove trace when ESLINT_PLUGIN_BOUNDARIES_DEBUG is not set
- feat: Improve performance adding internal cache
- chore(deps): Update devDependencies
- feat(#131): Add
boundaries/include
option allowing to ignore all by default except files matching the pattern.
- feat(#132): Detect paths from any
node_modules
folder as external - chore(deps): Update devDependencies
- chore(deps): Add node.js v16.x to engines and add tests using it
- chore(deps): Update devDependencies
- chore: Migrate Sonar project
- feat: Add basePattern and baseCapture options to elements settings (#97)
- chore(deps): Update dependencies
- fix: Avoid crash when import path is broken (#96)
- feat: Support multiple levels of categorization and any type of project structure (#75)
- feat: Support elements as files (#75)
- feat(settings): Added support for
import/resolver
setting - feat(options): Support micromatch patterns in rules options (#11, #10)
- feat: Add debug mode
- test: Add more than 500 tests using different project structure examples, with different categorization levels, elements as folders, as files, etc.
- test: Add one test for each rules docs example
- chore: Run tests on Windows OS again (#74)
- feat(settings): Deprecated
boundaries/types
setting.boundaries/elements
should be used instead. If it is not present,boundaries/types
will be used as fallback - feat(rules): Rename
allowed-types
rule intoelement-types
(now it can be used to allow/disallow). Change the format of rule options - feat(rules): Rename
no-external
rule intoexternal
(now it can be used to allow/disallow). Change the format of rule options - feat(rules): Change the format of
entry-point
rule options (now it support allow/disallow format) - feat(rules): Rename
no-import-ignored
rule intono-ignored
(the majority of the plugin rules are referred toimport
statements, so it is not necessary to specify it in the rule name) - feat(rules): Rename
no-import-not-recognized-types
rule intono-unknown
- feat(rules): Rename
prefer-recognized-types
rule intono-unknown-files
- refactor(core): Use
eslint-module-utils/resolve
to get files and import paths. Usemicromatch
to match settings and options. Adapt the whole core to this new approach
- fix: Support scoped packages in external rule (#59)
- feat(settings): Removed
boundaries/alias
setting
- Removed
boundaries/alias
setting.import/resolver
has to be used instead - Renamed
allowed-types
rule intoelement-types
(now it can be used to allow/disallow). Changed the format of rule options - Changed the format of
entry-point
rule options (now it support allow/disallow format) - Renamed
no-external
rule intoexternal
(now it can be used to allow/disallow). Changed the format of rule options - Renamed
no-import-ignored
rule intono-ignored
(the majority of the plugin rules are referred toimport
statements, so it is not necessary to specify it in the rule name) - Renamed
no-import-not-recognized-types
rule intono-unknown
- Renamed
prefer-recognized-types
rule intono-unknown-files
- feat: debug files and imports info when ESLINT_PLUGIN_BOUNDARIES_DEBUG environment variable exists
- feat:
mode
option inelements
setting now also acceptsfull
as value. Pattern will try to match the full path in that case. - feat: support defining multiple micromatch patterns in an array in the
pattern
property ofelements
setting.
- fix: node_modules packages were being recognized as local
- fix: Add folder resolver-legacy-alias to npm package
- feat: Support multiple levels of categorization and any type of project structure (#75)
- feat: Support elements as files (#75)
- feat(settings): Added support for
import/resolver
setting - feat(options): Support micromatch patterns in rules options (#11, #10)
- test: Add more than 500 tests using different project structure examples, with different categorization levels, elements as folders, as files, etc.
- test: Add one test for each rules docs example
- feat(settings): Deprecated
boundaries/types
setting.boundaries/elements
should be used instead. If it is not present,boundaries/types
will be used as fallback - feat(rules): Rename
allowed-types
rule intoelement-types
(now it can be used to allow/disallow). Change the format of rule options - feat(rules): Rename
no-external
rule intoexternal
(now it can be used to allow/disallow). Change the format of rule options - feat(rules): Change the format of
entry-point
rule options (now it support allow/disallow format) - feat(rules): Rename
no-import-ignored
rule intono-ignored
(the majority of the plugin rules are referred toimport
statements, so it is not necessary to specify it in the rule name) - feat(rules): Rename
no-import-not-recognized-types
rule intono-unknown
- feat(rules): Rename
prefer-recognized-types
rule intono-unknown-files
- refactor(core): Use
eslint-module-utils/resolve
to get files and import paths. Usemicromatch
to match settings and options. Adapt the whole core to this new approach
- fix: Support scoped packages in external rule (#59)
- feat(settings): Removed
boundaries/alias
setting
- Removed
boundaries/alias
setting.import/resolver
has to be used instead - Renamed
allowed-types
rule intoelement-types
(now it can be used to allow/disallow). Changed the format of rule options - Changed the format of
entry-point
rule options (now it support allow/disallow format) - Renamed
no-external
rule intoexternal
(now it can be used to allow/disallow). Changed the format of rule options - Renamed
no-import-ignored
rule intono-ignored
(the majority of the plugin rules are referred toimport
statements, so it is not necessary to specify it in the rule name) - Renamed
no-import-not-recognized-types
rule intono-unknown
- Renamed
prefer-recognized-types
rule intono-unknown-files
- chore(deps): Add Node.js 10.x support while it is in maintenance
- chore(ci-cd): Migrate build and publish pipelines to github actions
- chore(deps): Update dependencies
- fix(#65): Fixed error on dependency scanning when dependencyInfo.name is null (thanks to @skurfuerst)
- feat(no-external): Allow forbid importing external libraries specifiers
- chore(ci-cd): Add github workflows for publishing to gpr and check package version
- chore(engines): Add node v15.x to engines
- fix(no-external): Do not allow importing subfolders of forbidden external libraries
- chore: Run tests on Windows OS in pipelines
- fix: Plugin was not working properly on Windows
- chore: Update dependencies
- docs: Fix typo
- test(unit): Add unit tests
- test(coverage): Increase coverage threshold to 100
- feat(logs): Add chalk to warning logs
- refactor: Remove duplicated code
- fix(no-external): Fix no-external rule. There was an error reading options, so it was not being applied.
- fix(prefer-recognized-types): Do not apply prefer-recognized-types rule to ignored files.
- fix(rules): Ignore dependencies in all rules (except no-import-ignored) if they are marked as ignored
- fix(helpers): Avoid error in helper when an element is not recognized
- First pre-release