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
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default defineConfig([
files: ['**/*.{ts,tsx}'],
languageOptions: {
parserOptions: {
project: ['./tsconfig.eslint.json'],
project: ['./tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
},
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
],
"scripts": {
"build:bundle": "vite build",
"build:types": "tsc -b",
"build:types": "tsc -p tsconfig.build.json",
"build": "npm run build:bundle && npm run build:types",
"coverage": "vitest run --coverage --coverage.include=src --coverage.exclude=src/**/*.stories.tsx",
"lint": "eslint",
"lint:fix": "eslint --fix",
"prepublishOnly": "npm run build",
"storybook": "storybook dev -p 6006 --disable-telemetry",
"test": "vitest run",
"typecheck": "tsc --noEmit"
"typecheck": "tsc"
},
"devDependencies": {
"@eslint/compat": "2.0.2",
Expand Down
6 changes: 5 additions & 1 deletion test/helpers/dataframe/array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ describe('arrayDataFrame', () => {
df.eventTarget?.addEventListener('update', resolveListener)

// when a property of an array element (a cell) is changed, no event is dispatched, because the proxy is shallow
df._array[0].name = 'Alicia'
const originalRow = df._array[0]
if (originalRow === undefined) {
throw new Error('Original row is undefined')
}
Comment thread
severo marked this conversation as resolved.
originalRow.name = 'Alicia'
expect(resolveListener).toHaveBeenCalledTimes(0)
expect(df.getCell({ row: 0, column: 'name' })?.value).toBe('Alicia')
})
Expand Down
3 changes: 3 additions & 0 deletions test/providers/DataProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ describe('DataProvider', () => {
expect(getByTestId('column-descriptors').textContent).toBe(initialColumnDescriptors)
// Change the column descriptors in the data frame
data.columnDescriptors.push({ name: 'c', sortable: true })
if (data.columnDescriptors[0] === undefined || data.columnDescriptors[1] === undefined) {
throw new Error('Not enough column descriptors')
}
data.columnDescriptors[0].name = 'x'
data.columnDescriptors[1].sortable = true
Comment thread
severo marked this conversation as resolved.
// force a re-render without changing the data frame instance
Expand Down
27 changes: 27 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"target": "esnext",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
Comment thread
severo marked this conversation as resolved.

"moduleResolution": "bundler",
"isolatedModules": true,
"moduleDetection": "force",
"jsx": "react-jsx",

"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"noUncheckedIndexedAccess": true,

"rootDir": "src",
"outDir": "dist/types",
"emitDeclarationOnly": true,
"declaration": true
},
"include": ["src"]
}
4 changes: 0 additions & 4 deletions tsconfig.eslint.json

This file was deleted.

35 changes: 11 additions & 24 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
{
"extends": "./tsconfig.build.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
"target": "esnext",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

"moduleResolution": "bundler",
"isolatedModules": true,
"moduleDetection": "force",
"jsx": "react-jsx",

"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"noUncheckedIndexedAccess": true,

"rootDir": "src",
"outDir": "dist/types",
"emitDeclarationOnly": true,
"declaration": true
"noEmit": true,
"rootDir": "."
},
"include": ["src"]
"include": [
"src",
"test",
"**/*.js",
"**/*.ts",
"**/*.tsx",
"**/.storybook/*.ts"
]
}