-
Notifications
You must be signed in to change notification settings - Fork 67
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
Fix prettier and update to eslint-plugin-svelte #1621
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
"lint": "pnpm prettier; pnpm eslint; pnpm stylelint", | ||
"lint:ci": "pnpm prettier && pnpm eslint && pnpm stylelint", | ||
"format": "pnpm prettier:fix; pnpm eslint:fix; pnpm stylelint:fix", |
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.
using ;
in lint
(which should be run locally) will ensure all three are still run even if one fails. Using &&
in lint:ci
will fail our lint GitHub action if one of the individual scripts fails.
rules: { | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_|^\\$\\$(Props|Events|Slots)$', |
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 needed for when there's a (type|interface) $$Props = {}
(or $$Events
or $$Slots
) in a svelte component.
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.
@@ -52,12 +36,16 @@ module.exports = { | |||
es2017: true, | |||
node: true, | |||
}, | |||
globals: { | |||
App: 'readonly', | |||
$$Generic: 'readonly', |
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.
Needed for
type T = $$Generic;
interface $$Props {
myProp: T;
}
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.
.vscode/extensions.json
Outdated
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"bradlc.vscode-tailwindcss", | ||
"svelte.svelte-vscode" |
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.
Pretty TypeScript Errors might be a nice one to add here as well
"svelte.svelte-vscode" | |
"svelte.svelte-vscode", | |
"yoavbls.pretty-ts-errors" |
@@ -52,12 +36,16 @@ module.exports = { | |||
es2017: true, | |||
node: true, | |||
}, | |||
globals: { | |||
App: 'readonly', |
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.
Is this just "the fix" now? Or do we want to leave that "Temporary fix, see the following:" note in there in case there is an actually fix at some point?
Also, just want to confirm we don't want NetworkError
and NextPageToken
there anymore?
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.
Yeah, we don't need those anymore cause they are our types and we aren't referencing them globally anymore, i.e. we're importing them wherever they're needed.
And good call, I'll add a comment to the issue I linked in other comments in this PR
* Fix prettier and update to eslint-plugin-svelte (#1621) * make prettier and eslint play nice * add lint:ci so will fail in ci * format all the files * organize imports on save * update snaps from tailwind class order changes * update snaps * add recommended extensions * pr feedback * Add codefreeze branch regex to actions (#1636) * CodeMirror for CodeBlock (#1635) * Use CodeMirror for event history payloads * Add readonly prop * WIP: add copy icon to copy content in JSONEditor * Make codemirror the new CodeBlock. Need to figure out string new lines and how to update editor on content changes * Add folding, make string the type for content, update styles, make dynamic, remove PRISM * Fix extra stringifying * Fix small issues * Remove null check * Use margin * Fix CodeBlock testid * Add editable class to codeblock * Fix playwright payload tests, better extension logic to prevent lineWrapping on inline codeblocks * Make it more readable, add back storageState * [DT-1360] Updates to ExecutionStatus filter (#1641) * Reset filter when closing ExecutionStatus menu and remove Apply button * Add All option * Add Caller-Type to http headers, allow in ui-server, update tests (#1634) * Fix button so that it can't accept an `href` prop if disabled (#1642) * fix button types so `disabled` can't be used with `href` * fix schedules page buttons * upgrade cypress to v13.2.0 and associated changes * upgrade cypress github action to v6 * prettierignore cypress/downloads --------- Co-authored-by: Ross Edfort <rossedfort@gmail.com> Co-authored-by: Laura Whitaker <laura.whitaker@temporal.io>
* Fix prettier and update to eslint-plugin-svelte (#1621) * make prettier and eslint play nice * add lint:ci so will fail in ci * format all the files * organize imports on save * update snaps from tailwind class order changes * update snaps * add recommended extensions * pr feedback * Add codefreeze branch regex to actions (#1636) * CodeMirror for CodeBlock (#1635) * Use CodeMirror for event history payloads * Add readonly prop * WIP: add copy icon to copy content in JSONEditor * Make codemirror the new CodeBlock. Need to figure out string new lines and how to update editor on content changes * Add folding, make string the type for content, update styles, make dynamic, remove PRISM * Fix extra stringifying * Fix small issues * Remove null check * Use margin * Fix CodeBlock testid * Add editable class to codeblock * Fix playwright payload tests, better extension logic to prevent lineWrapping on inline codeblocks * Make it more readable, add back storageState * WIP: get decoding working on expand * Show the full payloadable, add to input and results * Clean up all the functions * Use onMount instead * Try to check the hash * Remove blakejs * Add cloneAllPotentialPayloadsWithCodec fn * Show null values * Delete all the port code, fix all tests and types and linting * Remove console.log * Don't add check, always use payloads key * Remove console.log and add key block on json navigator * Remove port test * Refactor fetchAllEvents to the workflow-history-layout. Fix timeline issue with json. Add loading to timeline * Add back loading check for empty row --------- Co-authored-by: Ross Edfort <rossedfort@gmail.com>
Description & motivation 💭
prettier-plugin-svelte
, updateprettier-plugin-tailwindcss
andprettier
, and fixprettier
scripts in package.json"eslint.validate"
to.vscode/settings.json
to enable format on save (may require a restart of VSCode)"source.organizeImports": true
to"editor.codeActionsOnSave"
in.vscode/settings.json
to auto sort importsScreenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?