-
Notifications
You must be signed in to change notification settings - Fork 894
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
chore: tweak biome config #15864
Changes from 5 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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; | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
{ | ||
"files": { | ||
"ignore": [ | ||
"e2e/provisionerGenerated.ts", | ||
"e2e/google/protobuf/timestampGenerated.ts", | ||
"src/api/countriesGenerated.ts", | ||
"src/api/rbacresourcesGenerated.ts" | ||
"build/", | ||
"node_modules/", | ||
"out/", | ||
"test-results/", | ||
"e2e/**/*Generated.ts", | ||
"src/api/*Generated.ts", | ||
"pnpm-lock.yaml" | ||
] | ||
}, | ||
"linter": { | ||
|
@@ -44,5 +47,6 @@ | |
} | ||
} | ||
} | ||
} | ||
}, | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. unfortunately yeah, but it's worth having for the autocompletion help |
||
} |
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/**/*.*", | ||
], | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.