-
-
Notifications
You must be signed in to change notification settings - Fork 49
feat(no-sync)!: move ts-declaration-location
to peerDependencies
#451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(no-sync)!: move ts-declaration-location
to peerDependencies
#451
Conversation
271865c
to
02db95b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to move the require()
, so it is loaded only when the option is configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a breaking change for people using the ignores
option of the no-sync
rule
ts-declaration-location
to peerDependencies
ts-declaration-location
to peerDependencies
the option was introduced in a minor (https://github.com/eslint-community/eslint-plugin-n/releases/tag/v17.19.0), but it unexpectedly introduced so technically it can be a bugfix? |
Yeah, moved below with a check for the existence of non-string
Likely so, I had read it as minor, given it "might break your lint build", being specific to TS users using However, as I have no data/visibility over how this is used, "likely to break your lint build" also applies.
I could see it working as such having been introduced 24d ago, although if someone's using it, it'd throw. Solvable by adding |
- Set `ts-declaration-location` as an optional peer dependency for the `n/no-sync` rule. - Move `ts-declaration-location` to `devDependencies` for development and testing. - Update the `n/no-sync` documentation to refer the updated peer dependency requirement. - Update `n/no-sync` rule to conditionally require `ts-declaration-location` only when advanced ignores are used.
02db95b
to
eeb4127
Compare
Description
ts-declaration-location
fromdependencies
todevDependencies
andpeerDependencies
, declaring it as optional onpeerDependenciesMeta
, which hastypescript
as a peer dependency.As
ts-declaration-location
is already tentatively loaded forn/no-sync
, the plugin keeps working as expected, throwing with a message identifying the missing package in case it'd be needed while trying to use theignores
option with a non-string value.n/no-sync
documentation to refer the updated peer dependency requirement.n/no-sync
rule to conditionally requirets-declaration-location
only when advanced ignores are used.Note
Set as
feat
as this should be at least a minor bump, as it may break a lint build.Related issues
Warning received while installing
eslint-plugin-n
on JS projects withouttypescript
:chore(no-sync): remove
@typescript-eslint/utils
#449 addressed@typescript-eslint/utils
.