Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .fallowrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json",
"entry": [
"fixtures/react-compat/rsbuild.config.mjs",
"storybook/stories/**/*.mdx"
],
"ignoreDependencies": [
"@rsbuild/core",
"@rsbuild/plugin-react",
"@size-limit/preset-small-lib"
],
"ignoreUnresolvedImports": [
"storybook/actions",
"storybook/manager-api",
"storybook/theming"
],
"rules": {
"unused-files": "error",
"unused-exports": "error",
"unused-dependencies": "error",
"unused-dev-dependencies": "error",
"dev-dependencies-in-production": "error",
"unresolved-imports": "error",
"unlisted-dependencies": "error",
"circular-dependencies": "error",
"stale-suppressions": "error"
},
"duplicates": {
"minOccurrences": 2
},
"health": {
"maxCyclomatic": 20,
"maxCognitive": 15,
"maxCrap": 30,
"maxUnitSize": 60,
"coverage": "coverage/coverage-final.json",
"thresholdOverrides": [
{
"files": ["storybook/stories/elements.tsx"],
"functions": ["EntryDetails", "ScrollWrapper"],
"maxCrap": 31,
"reason": "Interactive Storybook demos are intentionally excluded from unit coverage; retain the default structural complexity limits while allowing these two estimated CRAP scores."
},
{
"files": ["storybook/stories/useInView.story.tsx"],
"functions": ["HooksRender"],
"maxCrap": 43,
"reason": "This interactive Storybook demo is intentionally excluded from unit coverage; retain the default structural complexity limits while allowing its estimated CRAP score."
},
{
"files": ["storybook/stories/useOnInView.story.tsx"],
"functions": ["UseOnInViewRender"],
"maxCrap": 57,
"reason": "This interactive Storybook demo is intentionally excluded from unit coverage; retain the default structural complexity limits while allowing its measured CRAP score of 56."
}
],
"suggestInlineSuppression": false
}
}
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v6
Expand All @@ -28,6 +30,9 @@ jobs:
run: pnpm vitest --coverage
env:
CI: true
- name: Fallow audit
if: github.event_name == 'pull_request'
run: pnpm fallow audit --base "origin/${{ github.base_ref }}"
- name: Build
run: pnpm build

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ storybook-static
test-utils.js
test-utils.d.ts
__screenshots__
.fallow/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
"@vitest/browser-playwright": "^4.0.16",
"@vitest/coverage-istanbul": "^4.0.16",
"bumpp": "^10.3.2",
"fallow": "3.10.0",
"lint-staged": "^16.2.7",
"microbundle": "^0.15.1",
"npm-run-all": "^4.1.5",
"playwright": "^1.57.0",
"publint": "^0.3.16",
Expand Down
Loading
Loading