Skip to content

Commit ca97ad0

Browse files
committed
fix: repair broken CI pipelines
- rollup.config.mjs: switch tsconfig from tsconfig.json to tsconfig.lib.json tsconfig.json includes root-level JS files (lint-staged.config.js, jest.config.js), making TypeScript compute rootDir as the project root and emit to dist/src/index.js. @rollup/plugin-typescript uses ts.getOutputFileNames which returns dist/index.js, so emittedFiles lookup always misses and the plugin falls through without transpiling. tsconfig.lib.json includes only src files, rootDir is inferred as src/, and both paths agree on dist/index.js. - .eslintrc.js: ignore src/stories since tsconfig.json now excludes it; @typescript-eslint/parser requires project-included files to parse type-aware rules. - pullDown.test.tsx: global -> globalThis to fix no-unsafe-member-access lint error.
1 parent ca35db7 commit ca97ad0

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
version: '17.0',
2525
},
2626
},
27+
ignorePatterns: ['src/stories/**'],
2728
rules: {
2829
'@typescript-eslint/prefer-regexp-exec': 'warn',
2930
'@typescript-eslint/ban-ts-comment': 'off',

rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ export default {
3131
},
3232
],
3333
external: [...Object.keys(pkg.peerDependencies || {}), 'react/jsx-runtime'],
34-
plugins: [resolve(), typescript({ tsconfig: './tsconfig.json' })],
34+
plugins: [resolve(), typescript({ tsconfig: './tsconfig.lib.json' })],
3535
};

src/__tests__/pullDown.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('pull down to refresh', () => {
77
beforeAll(() => {
88
// ensure RAF exists
99
// @ts-ignore
10-
global.requestAnimationFrame = (cb: any) => cb();
10+
globalThis.requestAnimationFrame = (cb: any) => cb();
1111
// Mock getBoundingClientRect to return a height for maxPullDownDistance
1212
Element.prototype.getBoundingClientRect = jest.fn(() => ({
1313
height: 100,

0 commit comments

Comments
 (0)