Skip to content

Conversation

@neotob
Copy link
Collaborator

@neotob neotob commented Oct 9, 2025

No description provided.

### Changed

- migrated to eslint 9 flat config
- removed obsolete storybook
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will readd the storybook in a next pr with an updated of all the used packages... the current storybook version was still using the old before tanstack table and was therefor not useful anymore at all.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/neolution-ch/react-data-table/@neolution-ch/react-data-table@83

commit: 631bac7

virtualizer?: Virtualizer<HTMLDivElement, Element>;
}

// eslint-disable-next-line complexity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the complexity is really low in the eslint-config-neolution, is there a reason to have 12 in the package instead of the default 20?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was initially taken over from the config we had in whitelabel:
https://github.com/neolution-ch/neolution-dotnet-templates/pull/230/files#diff-c853350721291cfdc71a00324eb7d2ab43b4db04f74afefc6ff5ac4b4f3a7f4f
but i will take it on the list to discuss and maybe increase directly in the package 💪

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed and adjusted to the default values 💪


// If we active the manual filtering, we have to unset the filter function, else it still does automatic filtering
if (manualFiltering) columns.forEach((x) => (x.filterFn = undefined));
if (manualFiltering) for (const x of columns) x.filterFn = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no rule to have these logics with curly braces blocks?
nesting so much with the "inline block" might be dangerous and less readable, no?

my suggestion is to have it like this always:

if (manualFiltering) {
  for (const x of columns) {
    x.filterFn = undefined;
  }
}

are you aware of a rule like this? at least to limit to only allow 1 nested inline block?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems there's no way to limit to only 1 nested, would be interesting in big projects to see what happens by enabling this:

https://eslint.org/docs/latest/rules/curly#all

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhmm that is actually interesting, honestly this part was autoupdated by eslint, so I didnt put too much thoughts into it... but we also have a rule like this in c#, maybe I can take that as another point to discuss.. you would be for enabling this rule, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this with Timothy and added to my tech tasks, to check this rule in a big current project (for example hbl), to figure out, how well the configuration and especially the autofix works :) will keep you up to date as soon as I have a result there.

"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.12",
"eslint": "^9.37.0",
"eslint-plugin-storybook": "^0.10.0",
Copy link
Contributor

@drebrez drebrez Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess many libraries will need the eslint-plugin-storybook, is not worth to have it directly in eslint-config-neolution?
don't think those few kb are a problem for projects not actually using it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The storybooks were super neglejected in most projects, in this one here, it still had the reference to the datatable before we even used tanstack 😆 That's why initially it was not included in the package rule set.. but now with the possibility to configure the rules, it would definitely be an option and nicer... I will also take that on the list to discuss.. I think we should discuss in general, if out packages should include a story book or not (and then should also be maintained)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storybook will be added to the eslint package, task is on my list :)

@neotob neotob requested a review from manni497 January 7, 2026 08:44
import { getFilterValue, setFilterValue } from "../utils/customFilterMethods";
import { useVirtualizer, Virtualizer } from "@tanstack/react-virtual";
import { useRef } from "react";

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neotob The empty line could be removed at all :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manni497 random newline removed :D

export { ReactDataTable, ReactDataTableProps };
export { ReactDataTable };

export { ReactDataTableProps } from "./ReactDataTableProps";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a strange implementation before, make sense to add the ReactDataTableProps directly to the index.ts instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was thinking the same, but I didn't dare to break anything just because of a eslint upgrade :D


export { useReactDataTableProps } from "./useReactDataTableProps";

export { useReactDataTableResult } from "./useReactDataTableResult";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, makes sense to add both files to the index.ts?

export { useReactDataTableState, useReactDataTableStateProps, useReactDataTableStateResult };
export { useReactDataTableState };

export { useReactDataTableStateProps } from "./useReactDataTableStateProps";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comment :)

@@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable import/no-duplicates */
import "@tanstack/react-table";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neotob Have you tried to remove this import?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, not sure what this did, but at least the pipelines are still happy :P

@@ -1,4 +1,5 @@
import commonjs from "@rollup/plugin-commonjs";
// eslint-disable-next-line import/no-named-as-default
import nodeResolve from "@rollup/plugin-node-resolve";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we found a solution for this?

You should use a different name or import default as :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used another name thanks :)

@neotob neotob requested a review from manni497 January 9, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants