Skip to content
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

Add object-shorthand rule #166

Merged
merged 1 commit into from Oct 16, 2021
Merged

Add object-shorthand rule #166

merged 1 commit into from Oct 16, 2021

Conversation

LinusU
Copy link
Member

@LinusU LinusU commented Apr 24, 2020

Eco-system breakage:

@mightyiam
Copy link
Member

There's a problem with 'always' and TypeScript.

That rule is enabled in standard-with-typescript. And it should remain that way, for better type checking. So, the typescript config could possibly set object-shorthand back to 'properties' if it is ever upgraded to 'always'.

@LinusU
Copy link
Member Author

LinusU commented Apr 25, 2020

@mightyiam I believe that that lint only applies to interfaces, which is where the stricter typings comes into play. This rule would only enforce it on object literals, so I think it should be fine. I could totally be missing something though 😄

Also, I just realised that { a: () => {} } and { a () {} } has totally different semantics regarding this 🤔 Might be better to keep this as just properties if it forces on of those 🤔

This was referenced Apr 25, 2020
@feross
Copy link
Member

feross commented May 17, 2020

I've gone through and merged the PRs on the repos that I have access to!

@voxpelli voxpelli added this to the 18.0.0 milestone Oct 14, 2021
@voxpelli voxpelli mentioned this pull request Oct 14, 2021
3 tasks
@voxpelli
Copy link
Member

@LinusU Should we release this as a warn in 17.0.0? To prepare people for us making it an error in 18.0.0?

@LinusU
Copy link
Member Author

LinusU commented Oct 16, 2021

@voxpelli sounds very good 👍

@LinusU
Copy link
Member Author

LinusU commented Oct 16, 2021

Rebased and switched to warn

Copy link
Member

@voxpelli voxpelli left a comment

Choose a reason for hiding this comment

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

Merge away @LinusU 👍

@voxpelli voxpelli modified the milestones: 18.0.0, 17.0.0 Oct 16, 2021
@LinusU LinusU merged commit 7460290 into master Oct 16, 2021
@LinusU
Copy link
Member Author

LinusU commented Oct 16, 2021

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants