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

Proposal: Add a Code Formatter #597

Closed
y-hsgw opened this issue Dec 17, 2024 · 4 comments · Fixed by #602
Closed

Proposal: Add a Code Formatter #597

y-hsgw opened this issue Dec 17, 2024 · 4 comments · Fixed by #602

Comments

@y-hsgw
Copy link
Contributor

y-hsgw commented Dec 17, 2024

I propose introducing a code formatter, such as Prettier, to ensure consistent code style across the project.
If this sounds reasonable, I can help with the initial setup and configuration of Prettier (or any other preferred formatter).
Let me know your thoughts!😄

@veritem
Copy link
Member

veritem commented Dec 17, 2024

I have https://eslint.style/ setup with default configs. Did you find inconsistency anywhere in the repo?

@y-hsgw
Copy link
Contributor Author

y-hsgw commented Dec 17, 2024

Got it!
It might be possible that the formatting only applies to the .js files.
I think it would be a good idea to apply it to .ts files as well. What do you think?

@veritem
Copy link
Member

veritem commented Dec 18, 2024

Does it only format .js files only? It should be both.

@y-hsgw
Copy link
Contributor Author

y-hsgw commented Dec 18, 2024

Yes, it seems to be applied only to .js files.

For example, when running lint:js, I believe the following link should trigger an @stylistic/quotes error, but it doesn't seem to happen:

import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils";
import { createRequire } from "node:module"

It seems that the issue is likely caused by the omission of the files property in the ESLint configuration. I will address this by adding the necessary files property.
https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-with-arbitrary-extensions

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 a pull request may close this issue.

2 participants