chore(deps): update dependency eslint-plugin-import-x to v4.5.0 #837
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.4.3
->4.5.0
Release Notes
un-ts/eslint-plugin-import-x (eslint-plugin-import-x)
v4.5.0
Compare Source
Minor Changes
fbf639b
Thanks @SukkaW! - The PR implements the new resolver design proposed in https://github.com/un-ts/eslint-plugin-import-x/issues/40#issuecomment-2381444266For
eslint-plugin-import-x
usersLike the ESLint flat config allows you to use js objects (e.g. import and require) as ESLint plugins, the new
eslint-plugin-import-x
resolver settings allow you to use js objects as custom resolvers through the new settingimport-x/resolver-next
:The new
import-x/resolver-next
no longer accepts strings as the resolver, thus will not be compatible with the ESLint legacy config (a.k.a..eslintrc
). Those who are still using the ESLint legacy config should stick withimport-x/resolver
.In the next major version of
eslint-plugin-import-x
(v5), we will rename the currently existingimport-x/resolver
toimport-x/resolver-legacy
(which allows the existing ESLint legacy config users to use their existing resolver settings), andimport-x/resolver-next
will become the newimport-x/resolver
. When ESLint v9 (the last ESLint version with ESLint legacy config support) reaches EOL in the future, we will removeimport-x/resolver-legacy
.We have also made a few breaking changes to the new resolver API design, so you can't use existing custom resolvers directly with
import-x/resolver-next
:For easier migration, the PR also introduces a compat utility
importXResolverCompat
that you can use in youreslint.config.js
:For custom import resolver developers
This is the new API design of the resolver interface:
You will be able to import
NewResolver
fromeslint-plugin-import-x/types
.The most notable change is that
eslint-plugin-import-x
no longer passes the third argument (options
) to theresolve
function.We encourage custom resolvers' authors to consume the options outside the actual
resolve
function implementation. You can export a factory function to accept the options, this factory function will then be called inside theeslint.config.js
to get the actual resolver:This allows you to create a reusable resolver instance to improve the performance. With the existing version of the resolver interface, because the options are passed to the
resolver
function, you will have to create a resolver instance every time theresolve
function is called:With the factory function pattern, you can create a resolver instance beforehand:
Patch Changes
#184
bc4de89
Thanks @marcalexiei! - fix(no-cycle): improves the type declaration of the ruleno-cycle
’smaxDepth
option#184
bc4de89
Thanks @marcalexiei! - fix(first): improves the type declaration of the rulefirst
's option#184
bc4de89
Thanks @marcalexiei! - fix(no-unused-modules): improves the type declaration of the ruleno-unused-modules
’smissingExports
option#184
bc4de89
Thanks @marcalexiei! - fix(no-deprecated): improve error message when no description is availableConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.