-
Notifications
You must be signed in to change notification settings - Fork 125
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
Additional typechecking with prettier update #3774
Conversation
…some errors to warnings
…a/rill into additional-type-checking
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
automatic re-sorting of deps, no actual change in /docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to replicate this re-sorting behavior, but I see *.json
is included in the .prettierignore
file. How did these re-sort automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they actually re-sorted when I was npm installing
stuff, not from prettier.
@@ -3,7 +3,8 @@ module.exports = { | |||
extends: [ | |||
"eslint:recommended", | |||
"plugin:@typescript-eslint/recommended", | |||
'plugin:svelte/recommended', | |||
"plugin:@typescript-eslint/recommended-type-checked", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added current recommended eslint typechecking rules, and then disabled failing rules below so that we can clean them up incrementally
"eslint-plugin-svelte": "^2.35.1", | ||
"prettier": "^3.1.1", | ||
"prettier-plugin-svelte": "^3.1.2", | ||
"typescript": "^5.3.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved code quality dev deps to root package.json
"svelte": "^4.0.0", | ||
"svelte-check": "^3.4.3", | ||
"svelte-popperjs": "^1.3.2", | ||
"svelte-preprocess": "^5.0.3", | ||
"tailwindcss": "^3.2.7", | ||
"typescript": "^5.0.0", | ||
"web-common": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved code quality dev deps to root package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup 💪. Left a couple questions inline.
To get format-on-save working for me in VSCode, I also had to add to my VSCode config "prettier.documentSelectors": ["**/*.svelte"]
described here. Maybe call that out for others in the PR description?
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to replicate this re-sorting behavior, but I see *.json
is included in the .prettierignore
file. How did these re-sort automatically?
@@ -43,5 +43,7 @@ | |||
"**/*.d.ts", | |||
"**/*.ts", | |||
"**/*.svelte", | |||
"prettier.config.js", | |||
"**/rollup.config.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead use rollup.config.ts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm not sure. The rollup config we have is currently js not ts, and I don't know whether rollup includes a tsc preprocessing+compilation step for ts files. I think we can investigate in follow up work.
? err.policy | ||
: typeof err?.error_description === "string" | ||
? err.error_description | ||
: err?.message; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
6089d2b
to
1658872
Compare
updates Prettier, eslint, and typescript to latest versions.
Note that you may need to tweak your vscode settings to get format-on-save working --
I needed to do this to get it working for svelte files:
"""ok, i think for me it was a bad vscode setting. I went to a svelte file, borked the formatting, then did ctrl+shift+p to "format doc" through the command bar. It told me that the prettier plugin didn't know how to format svelte files, and let me choose the svlete plugin. seems to be working now""" (see this slack conversation, which also includes discussion of what Brian needed to do: https://rilldata.slack.com/archives/C04AGHL77PS/p1704405722497439?thread_ts=1704400984.394149&cid=C04AGHL77PS)
Eric needed to do this:
"""To get format-on-save working for me in VSCode, I also had to add to my VSCode config "prettier.documentSelectors": ["**/*.svelte"] described here."""