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

style: add prettier for whitespace formatting #142

Closed
wants to merge 1 commit into from

Conversation

bvandercar-vt
Copy link
Contributor

Thought I'd try this out and see how it looked, since ts-standard wasn't fixing whitespaces. Just a proposal, up to the repo owners if they like this!

@@ -52,5 +53,11 @@
"transform": {
"^.+\\.(t|j)sx?$": "@swc/jest"
}
},
"prettier":{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this config seemed to be what resulted in the least changes from existing code

@Niek
Copy link
Collaborator

Niek commented May 15, 2024

Hmm, I'm a bit scared prettier and standardjs (/ts-standard) will clash on some code. Is there no way to get this working by adding an extra eslint rule to the standardjs ones? Or otherwise, eslint-plugin-prettier?

@bvandercar-vt
Copy link
Contributor Author

bvandercar-vt commented May 15, 2024

Hmm, I'm a bit scared prettier and standardjs (/ts-standard) will clash on some code. Is there no way to get this working by adding an extra eslint rule to the standardjs ones? Or otherwise, eslint-plugin-prettier?

I've seen many repos with all 3 (ts checking, eslint, and prettier), there shouldn't be any clashing I don't think?

The problem with ts-standard is you can't configure it. You can't add eslint plugins, or configure specific eslint rules. Would have to move towards regular eslint.

@Niek
Copy link
Collaborator

Niek commented May 16, 2024

Hmm, I'm a bit scared prettier and standardjs (/ts-standard) will clash on some code. Is there no way to get this working by adding an extra eslint rule to the standardjs ones? Or otherwise, eslint-plugin-prettier?

I've seen many repos with all 3 (ts checking, eslint, and prettier), there shouldn't be any clashing I don't think?

The problem with ts-standard is you can't configure it. You can't add eslint plugins, or configure specific eslint rules. Would have to move towards regular eslint.

I think it's definitely possible to add extra rules and configure ts-standard. These can be added to package.json or tsconfig.eslint.json. See: https://standardjs.com/#typescript

@bvandercar-vt
Copy link
Contributor Author

Hmm, I'm a bit scared prettier and standardjs (/ts-standard) will clash on some code. Is there no way to get this working by adding an extra eslint rule to the standardjs ones? Or otherwise, eslint-plugin-prettier?

I've seen many repos with all 3 (ts checking, eslint, and prettier), there shouldn't be any clashing I don't think?
The problem with ts-standard is you can't configure it. You can't add eslint plugins, or configure specific eslint rules. Would have to move towards regular eslint.

I think it's definitely possible to add extra rules and configure ts-standard. These can be added to package.json or tsconfig.eslint.json. See: https://standardjs.com/#typescript

Have tried to get multiple plugins to work with ts-standard-- Nothing I've tried works. Will just close this PR. I do see how prettier has conflicting opinions with ts-standard.

@bvandercar-vt bvandercar-vt deleted the style/prettier branch May 16, 2024 16: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