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

ESLint rule and have Prettier handle import type { Type } Pattern #2129

Closed
JacobMGEvans opened this issue Nov 4, 2022 · 7 comments
Closed
Assignees
Labels
maintenance Maintenance task polish Small improvements to the experience quick win Potentially easy/straightforward issue to tackle

Comments

@JacobMGEvans
Copy link
Contributor

JacobMGEvans commented Nov 4, 2022

    > Is there something wrong with the `import { type ..., ... }` pattern? I think I've used that in various places

@penalosa consistency, we started with the import type { FetchError } from "../cfetch"; and would like to keep it consistent, we should at it as a ESLint rule and have Prettier handle it if it can.

Originally posted by @JacobMGEvans in #2064 (comment)
Cc: @penalosa

@JacobMGEvans JacobMGEvans self-assigned this Nov 4, 2022
@JacobMGEvans JacobMGEvans added maintenance Maintenance task polish Small improvements to the experience quick win Potentially easy/straightforward issue to tackle labels Nov 4, 2022
@JacobMGEvans JacobMGEvans moved this to Untriaged in workers-sdk Nov 4, 2022
@JacobMGEvans JacobMGEvans moved this from Untriaged to Backlog in workers-sdk Nov 4, 2022
@mrkldshv
Copy link
Contributor

mrkldshv commented Nov 6, 2022

Hey! Is this issue free to pick up?

@JacobMGEvans
Copy link
Contributor Author

Sure 😄

@mrkldshv
Copy link
Contributor

mrkldshv commented Nov 8, 2022

To give an update here: the change that allows to enforce such pattern was just merged. I'll update the configuration in the repository when the release with this PR is published.

@JacobMGEvans JacobMGEvans moved this from Backlog to Other in workers-sdk Nov 10, 2022
@mrkldshv
Copy link
Contributor

It seems like we also need to this rule to be released to be able to enforce import type {} pattern. Will be tracking new releases of eslint-plugin-import.

@JacobMGEvans
Copy link
Contributor Author

Just following up on this, are you still working on this @mrkldshv ?

@mrkldshv
Copy link
Contributor

Sure! From what I understood we'd need release of https://github.com/import-js/eslint-plugin-import to make it work. The old version doesn't have consistent-type-specifier-style rule. Let me know if we can do anything meanwhile!

@JacobMGEvans JacobMGEvans removed their assignment Sep 19, 2023
@penalosa
Copy link
Contributor

Closing this issue since we've configured Prettier to do this

@github-project-automation github-project-automation bot moved this from Other to Done in workers-sdk May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance task polish Small improvements to the experience quick win Potentially easy/straightforward issue to tackle
Projects
Archived in project
Development

No branches or pull requests

3 participants