-
Notifications
You must be signed in to change notification settings - Fork 887
chore: improve eslint, sb, tsc configs #483
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
Conversation
Summary: This commit is a bit of a shotgun fix for various project settings. Realistically, they could've been separate commits, but this is convenience for just getting things into a green state to unblock further work. Details: - Use our version of TS in vscode plugins - organize vscode/settings.json - fix tsconfig.test and tsconfig.prod (removes errors in test files) - only use prod tsconfig in webpack - point .eslintrc to both test and prod configs - cleanup storybook
@@ -1,31 +1,4 @@ | |||
{ |
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 file was:
- re-organized (alphabetically). Reason = "at a glance" behaviors.
- we point vscode plugins to use our version of TS installed, not the version shipped with vs code (this fixes various problems in reading
tsconfig
files and red squiggly lines showing up in files)
// Automatically loads all stories in source ending in 'stories.tsx' | ||
// | ||
// SEE: https://storybook.js.org/docs/react/configure/overview#configure-story-loading | ||
stories: ["../src/**/*.stories.tsx"], |
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 simplified this for now because:
- it's just easier to understand like this
- we don't have use-cases or scenarios for mdx or ts stories
- changing this to accommodate mdx or ts files later is trivial
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.
Cool! Perhaps worth updating this in v1 also? https://github.com/coder/m/blob/ffc32a2c6e5bb762e58c9cdca30fbd3ce4323886/product/coder/site/.storybook/main.js#L4
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 have a similar commit in an unpushed branch for v1, yes! Good call!
Codecov Report
@@ Coverage Diff @@
## main #483 +/- ##
==========================================
+ Coverage 68.01% 68.10% +0.09%
==========================================
Files 160 158 -2
Lines 9278 9271 -7
Branches 79 79
==========================================
+ Hits 6310 6314 +4
+ Misses 2343 2334 -9
+ Partials 625 623 -2
Continue to review full report at Codecov.
|
@@ -9,7 +9,7 @@ Started container user | |||
Using user 'coder' with shell '/bin/bash'`.split("\n") | |||
|
|||
export default { | |||
title: "CodeBlock", | |||
title: "CodeBlock/CodeBlock", |
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.
There are two types of CodeBlocks, so I organized them. Furthermore, this makes it so that every current story has a top-level heading, which is visually appealing.
This is safe because we don't allow JS in our tsconfigs! We only use JS for config files!
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.
Thanks for cleaning this up, @vapurrmaid !
Summary: This is a first step in porting over v1 AuditLog in a refactored/cleaned up fashion. This isn't a direct port, since we do not yet have a UserAvatar component. Details: - Port over UserCell from v1, sans UserAvatar impl - Add tests and stories for UserCell Notes: We do not have a holistic solution for handling localization, but starting from some kind of easy way that collects/resources strings will make the migration significantly easier. It will also help out our product copy owner, @khorne3 with maintenance. An RFC regarding this might be necessitated. Impact: This change does not have any user-facing impact yet, because the UserCell is not yet rendered in the product. This enables an incremental approach to migrating in the FE of the Audit Log, which is still waiting on the BE port. Relations: - This commit relates to #472, but does not finish it. - This commit should not merge until after #465 and #483 because it's based on them.
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.
Thanks for doing this!
Summary: This is a first step in porting over v1 AuditLog in a refactored/cleaned up fashion. This isn't a direct port, since we do not yet have a UserAvatar component. Details: - Port over UserCell from v1, sans UserAvatar impl - Add tests and stories for UserCell Notes: We do not have a holistic solution for handling localization, but starting from some kind of easy way that collects/resources strings will make the migration significantly easier. It will also help out our product copy owner, @khorne3 with maintenance. An RFC regarding this might be necessitated. Impact: This change does not have any user-facing impact yet, because the UserCell is not yet rendered in the product. This enables an incremental approach to migrating in the FE of the Audit Log, which is still waiting on the BE port. Relations: - This commit relates to #472, but does not finish it. - This commit should not merge until after #465 and #483 because it's based on them.
Summary: This is a first step in porting over v1 AuditLog in a refactored/cleaned up fashion. The existing `UserCell` component was generalized for re-use across various tables (AuditLog, Users, Orgs). Details: - Move UserCell to `components/Table/Cells` - Add tests and stories for UserCell Impact: This unblocks future work in list views like the audit log, user management panel and organizations management panel. Relations: - This commit relates to #472, but does not finish it. - This commit should not merge until after #465 and #483 because it's based on them.
Summary:
This commit is a bit of a shotgun fix for various project settings.
Realistically, they could've been separate commits, but this is
convenience for just getting things into a green state to unblock
further work.
Details:
maxWorkers
like we had in v1 to fix this.