-
Notifications
You must be signed in to change notification settings - Fork 114
FE-518: Add Storybook and update build/lint setup for refractive #8549
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6748526
FE-518: Add Storybook and update build/lint setup for refractive
kube 33c44c8
FE-518: Exclude `node_modules` from workspace glob to fix turbo dupli…
kube 78ffacb
FE-518: Modernize refractive build and lint setup
kube 32b6832
FE-518: Fix PR review findings for refractive
kube 7879015
FE-518: Upgrade tsdown from ^0.18.1 to ^0.21.4 in @hashintel/ds-* pac…
kube 32992dd
Format and deduplicate
kube File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": ["import", "react", "jsx-a11y", "unicorn", "typescript"], | ||
| "categories": { | ||
| "correctness": "error" | ||
| }, | ||
| "env": { | ||
| "builtin": true, | ||
| "es2026": true, | ||
| "browser": true | ||
| }, | ||
| "rules": { | ||
| "array-callback-return": ["error", { "allowImplicit": true }], | ||
| "default-case-last": "error", | ||
| "default-param-last": "error", | ||
| "eqeqeq": ["error", "always", { "null": "ignore" }], | ||
| "guard-for-in": "error", | ||
| "no-alert": "error", | ||
| "no-cond-assign": ["error", "always"], | ||
| "no-extend-native": "error", | ||
| "no-loop-func": "error", | ||
| "no-new": "error", | ||
| "no-param-reassign": [ | ||
| "error", | ||
| { | ||
| "props": true, | ||
| "ignorePropertyModificationsForRegex": ["^existing", "draft"] | ||
| } | ||
| ], | ||
| "no-return-assign": ["error", "always"], | ||
| "no-self-compare": "error", | ||
| "no-sequences": "error", | ||
| "no-template-curly-in-string": "error", | ||
| "no-unsafe-optional-chaining": [ | ||
| "error", | ||
| { "disallowArithmeticOperators": true } | ||
| ], | ||
| "no-unused-vars": [ | ||
| "error", | ||
| { | ||
| "args": "all", | ||
| "argsIgnorePattern": "^_+", | ||
| "varsIgnorePattern": "^_+" | ||
| } | ||
| ], | ||
| "no-void": ["error", { "allowAsStatement": true }], | ||
|
|
||
| "no-console": "error", | ||
| "new-cap": "error", | ||
| "no-new-func": "error", | ||
| "func-names": "error", | ||
| "no-bitwise": "error", | ||
| "no-multi-assign": "error", | ||
|
|
||
| "no-restricted-globals": [ | ||
| "error", | ||
| { "name": "isFinite", "message": "Use Number.isFinite instead" }, | ||
| { "name": "isNaN", "message": "Use Number.isNaN instead" }, | ||
| "event", | ||
| "name", | ||
| "length", | ||
| "status" | ||
| ], | ||
| "no-shadow": "error", | ||
| "no-use-before-define": "error", | ||
|
|
||
| "no-restricted-imports": [ | ||
| "error", | ||
| { | ||
| "patterns": [ | ||
| { | ||
| "group": ["@local/*"], | ||
| "message": "You cannot use unpublished local packages in a published package." | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
|
|
||
| "import/no-named-as-default": "error", | ||
| "import/no-named-as-default-member": "error", | ||
| "import/no-mutable-exports": "error", | ||
| "import/no-duplicates": "error", | ||
| "import/no-named-default": "error", | ||
| "import/no-self-import": "error", | ||
| "import/no-cycle": "error", | ||
|
|
||
| "react/jsx-pascal-case": ["error", { "allowAllCaps": true }], | ||
| "react/no-danger": "error", | ||
| "react/jsx-no-target-blank": ["error", { "enforceDynamicLinks": "always" }], | ||
| "react/jsx-no-comment-textnodes": "error", | ||
| "react/no-array-index-key": "error", | ||
| "react/button-has-type": [ | ||
| "error", | ||
| { "button": true, "submit": true, "reset": false } | ||
| ], | ||
|
|
||
| "react-hooks/rules-of-hooks": "error", | ||
| "react-hooks/exhaustive-deps": "off", | ||
|
|
||
| "jsx-a11y/prefer-tag-over-role": "off", | ||
| "jsx-a11y/aria-role": ["error", { "ignoreNonDOM": false }], | ||
| "jsx-a11y/no-noninteractive-tabindex": [ | ||
| "error", | ||
| { "tags": [], "roles": ["tabpanel"] } | ||
| ], | ||
| "jsx-a11y/label-has-associated-control": "error", | ||
| "jsx-a11y/no-static-element-interactions": [ | ||
| "error", | ||
| { | ||
| "handlers": [ | ||
| "onClick", | ||
| "onMouseDown", | ||
| "onMouseUp", | ||
| "onKeyPress", | ||
| "onKeyDown", | ||
| "onKeyUp" | ||
| ] | ||
| } | ||
| ], | ||
|
|
||
| "@typescript-eslint/ban-ts-comment": [ | ||
| "error", | ||
| { | ||
| "ts-expect-error": "allow-with-description", | ||
| "minimumDescriptionLength": 10 | ||
| } | ||
| ], | ||
| "@typescript-eslint/no-empty-object-type": "error", | ||
| "@typescript-eslint/no-explicit-any": "error", | ||
| "@typescript-eslint/no-require-imports": "error", | ||
| "@typescript-eslint/no-unnecessary-type-constraint": "error", | ||
| "@typescript-eslint/no-implied-eval": "error", | ||
| "@typescript-eslint/no-misused-promises": "error", | ||
| "@typescript-eslint/no-unnecessary-condition": "error", | ||
| "@typescript-eslint/no-unsafe-assignment": "error", | ||
| "@typescript-eslint/no-unsafe-call": "error", | ||
| "@typescript-eslint/no-unsafe-function-type": "error", | ||
|
|
||
| "unicorn/no-new-array": "off", | ||
| "unicorn/filename-case": "error", | ||
|
|
||
| "constructor-super": "off", | ||
| "no-class-assign": "off", | ||
| "no-const-assign": "off", | ||
| "no-dupe-keys": "off", | ||
| "no-func-assign": "off", | ||
| "no-import-assign": "off", | ||
| "no-obj-calls": "off", | ||
| "no-redeclare": "off", | ||
| "no-setter-return": "off", | ||
| "no-this-before-super": "off", | ||
| "no-unsafe-negation": "off", | ||
| "no-constant-condition": "off", | ||
| "no-throw-literal": "off", | ||
| "prefer-promise-reject-errors": "off" | ||
| }, | ||
| "ignorePatterns": [ | ||
| "dist/**", | ||
| "build/**", | ||
| "coverage/**", | ||
| "*.gen.*", | ||
| "*.tsbuildinfo", | ||
| ".turbo/**" | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
|
||
| const config: StorybookConfig = { | ||
| framework: "@storybook/react-vite", | ||
| stories: ["../stories/**/*.stories.@(ts|tsx)"], | ||
| }; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import type { Preview } from "@storybook/react"; | ||
|
|
||
| const preview: Preview = { | ||
| parameters: { | ||
| layout: "fullscreen", | ||
| }, | ||
| }; | ||
|
|
||
| export default preview; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.