-
Notifications
You must be signed in to change notification settings - Fork 881
chore: tweak biome config #15864
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
chore: tweak biome config #15864
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,40 @@ | ||
import turbosnap from "vite-plugin-turbosnap"; | ||
|
||
module.exports = { | ||
stories: ["../src/**/*.stories.tsx"], | ||
stories: ["../src/**/*.stories.tsx"], | ||
|
||
addons: [ | ||
"@chromatic-com/storybook", | ||
{ | ||
name: "@storybook/addon-essentials", | ||
options: { | ||
backgrounds: false, | ||
}, | ||
}, | ||
"@storybook/addon-links", | ||
"@storybook/addon-mdx-gfm", | ||
"@storybook/addon-themes", | ||
"@storybook/addon-actions", | ||
"@storybook/addon-interactions", | ||
"storybook-addon-remix-react-router", | ||
], | ||
addons: [ | ||
"@chromatic-com/storybook", | ||
{ | ||
name: "@storybook/addon-essentials", | ||
options: { | ||
backgrounds: false, | ||
}, | ||
}, | ||
"@storybook/addon-links", | ||
"@storybook/addon-mdx-gfm", | ||
"@storybook/addon-themes", | ||
"@storybook/addon-actions", | ||
"@storybook/addon-interactions", | ||
"storybook-addon-remix-react-router", | ||
], | ||
|
||
staticDirs: ["../static"], | ||
staticDirs: ["../static"], | ||
|
||
framework: { | ||
name: "@storybook/react-vite", | ||
options: {}, | ||
}, | ||
framework: { | ||
name: "@storybook/react-vite", | ||
options: {}, | ||
}, | ||
|
||
async viteFinal(config, { configType }) { | ||
config.plugins = config.plugins || []; | ||
// return the customized config | ||
if (configType === "PRODUCTION") { | ||
// ignore @ts-ignore because it's not in the vite types yet | ||
config.plugins.push( | ||
turbosnap({ | ||
rootDir: config.root || "", | ||
}), | ||
); | ||
} | ||
return config; | ||
}, | ||
async viteFinal(config, { configType }) { | ||
config.plugins = config.plugins || []; | ||
if (configType === "PRODUCTION") { | ||
config.plugins.push( | ||
turbosnap({ | ||
rootDir: config.root || "", | ||
}), | ||
); | ||
} | ||
return 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
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 |
---|---|---|
@@ -1,68 +1,68 @@ | ||
module.exports = { | ||
// Use a big timeout for CI. | ||
testTimeout: 20_000, | ||
maxWorkers: 8, | ||
projects: [ | ||
{ | ||
displayName: "test", | ||
roots: ["<rootDir>"], | ||
setupFiles: ["./jest.polyfills.js"], | ||
setupFilesAfterEnv: ["./jest.setup.ts"], | ||
extensionsToTreatAsEsm: [".ts"], | ||
transform: { | ||
"^.+\\.(t|j)sx?$": [ | ||
"@swc/jest", | ||
{ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: "automatic", | ||
importSource: "@emotion/react", | ||
}, | ||
}, | ||
experimental: { | ||
plugins: [["jest_workaround", {}]], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
testEnvironment: "jsdom", | ||
testEnvironmentOptions: { | ||
customExportConditions: [""], | ||
}, | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | ||
testPathIgnorePatterns: [ | ||
"/node_modules/", | ||
"/e2e/", | ||
// TODO: This test is timing out after upgrade a few Jest dependencies | ||
// and I was not able to figure out why. When running it specifically, I | ||
// can see many act warnings that may can help us to find the issue. | ||
"/usePaginatedQuery.test.ts", | ||
], | ||
transformIgnorePatterns: [ | ||
"<rootDir>/node_modules/@chartjs-adapter-date-fns", | ||
], | ||
moduleDirectories: ["node_modules", "<rootDir>/src"], | ||
moduleNameMapper: { | ||
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts", | ||
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts", | ||
}, | ||
}, | ||
], | ||
collectCoverageFrom: [ | ||
// included files | ||
"<rootDir>/**/*.ts", | ||
"<rootDir>/**/*.tsx", | ||
// excluded files | ||
"!<rootDir>/**/*.stories.tsx", | ||
"!<rootDir>/_jest/**/*.*", | ||
"!<rootDir>/api.ts", | ||
"!<rootDir>/coverage/**/*.*", | ||
"!<rootDir>/e2e/**/*.*", | ||
"!<rootDir>/jest-runner.eslint.config.js", | ||
"!<rootDir>/jest.config.js", | ||
"!<rootDir>/out/**/*.*", | ||
"!<rootDir>/storybook-static/**/*.*", | ||
], | ||
// Use a big timeout for CI. | ||
testTimeout: 20_000, | ||
maxWorkers: 8, | ||
projects: [ | ||
{ | ||
displayName: "test", | ||
roots: ["<rootDir>"], | ||
setupFiles: ["./jest.polyfills.js"], | ||
setupFilesAfterEnv: ["./jest.setup.ts"], | ||
extensionsToTreatAsEsm: [".ts"], | ||
transform: { | ||
"^.+\\.(t|j)sx?$": [ | ||
"@swc/jest", | ||
{ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: "automatic", | ||
importSource: "@emotion/react", | ||
}, | ||
}, | ||
experimental: { | ||
plugins: [["jest_workaround", {}]], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
testEnvironment: "jsdom", | ||
testEnvironmentOptions: { | ||
customExportConditions: [""], | ||
}, | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | ||
testPathIgnorePatterns: [ | ||
"/node_modules/", | ||
"/e2e/", | ||
// TODO: This test is timing out after upgrade a few Jest dependencies | ||
// and I was not able to figure out why. When running it specifically, I | ||
// can see many act warnings that may can help us to find the issue. | ||
"/usePaginatedQuery.test.ts", | ||
], | ||
transformIgnorePatterns: [ | ||
"<rootDir>/node_modules/@chartjs-adapter-date-fns", | ||
], | ||
moduleDirectories: ["node_modules", "<rootDir>/src"], | ||
moduleNameMapper: { | ||
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts", | ||
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts", | ||
}, | ||
}, | ||
], | ||
collectCoverageFrom: [ | ||
// included files | ||
"<rootDir>/**/*.ts", | ||
"<rootDir>/**/*.tsx", | ||
// excluded files | ||
"!<rootDir>/**/*.stories.tsx", | ||
"!<rootDir>/_jest/**/*.*", | ||
"!<rootDir>/api.ts", | ||
"!<rootDir>/coverage/**/*.*", | ||
"!<rootDir>/e2e/**/*.*", | ||
"!<rootDir>/jest-runner.eslint.config.js", | ||
"!<rootDir>/jest.config.js", | ||
"!<rootDir>/out/**/*.*", | ||
"!<rootDir>/storybook-static/**/*.*", | ||
], | ||
}; |
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
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.
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.
Would this need to be manually bumped when @dependabot bumps biome version?
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 think so.
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.
unfortunately yeah, but it's worth having for the autocompletion help