Skip to content

Change default setting from a string to a object#78

Merged
koddsson merged 1 commit into
masterfrom
array-type-is-object-now
Nov 7, 2019
Merged

Change default setting from a string to a object#78
koddsson merged 1 commit into
masterfrom
array-type-is-object-now

Conversation

@koddsson

@koddsson koddsson commented Nov 6, 2019

Copy link
Copy Markdown
Contributor

After #77 we make consumers of this lib install the latest versions of all the dependencies so when packages make breaking changes it will break in those applications.

One of those breaking changes come from @typescript-eslint/eslint-plugin where the array type option was changed from a simple string to an options object.

This PR changes the array type option from a 'array-simple' string to a {default: 'array-simple'} option object.

The breaking change was made in typescript-eslint/typescript-eslint#654 and you can read the docs for the rule here

@keithamus keithamus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to ensure backwards compatibility here? Do we need to detect what version is being used and emit the right option?

@koddsson

koddsson commented Nov 7, 2019

Copy link
Copy Markdown
Contributor Author

Is it possible to ensure backwards compatibility here? Do we need to detect what version is being used and emit the right option?

I'm not sure. We can't read the package.json of this package since it wants version >= 2.5.0.

We would probably need to find where @typescript-eslint/parsers is installed and read it's package.json to figure out it's version but that seems fragile to me.

@koddsson

koddsson commented Nov 7, 2019

Copy link
Copy Markdown
Contributor Author

Talked with @keithamus on slack, and we actually don't need backwards compatibilty with @typescript-eslint/eslint-plugin@1 since we require version >= 2.5.0 after we merged #77.

@koddsson
koddsson merged commit 3bbc20f into master Nov 7, 2019
@koddsson
koddsson deleted the array-type-is-object-now branch November 7, 2019 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants