react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Enable `noImplicitAny` in all packages

Open nawan-b opened this issue 1 month ago • 3 comments

Since the TypeScript 6 upgrade (#11347), the root tsconfig.json enables strict: true but still sets noImplicitAny: false, which disables strict's most important check for every package extending it.

Removing that line produces the following errors in package sources (specs and stories excluded), measured with tsc --noEmit -p packages/<pkg> --noImplicitAny true:

Package Errors
ra-ui-materialui 214
ra-core 206
ra-data-fakerest 22
ra-data-graphql-simple 22
ra-no-code 22
ra-data-local-storage 20
ra-data-graphql 17
ra-input-rich-text 12
ra-i18n-i18next 8
react-admin 8
create-react-admin 6
ra-data-json-server 1
ra-data-local-forage 1

Mostly TS7006 (implicitly-any parameters), then TS7031 (destructured bindings) and TS7053 (index access). Spec and story files will add more.

Suggested approach: one PR per package (small packages first), enabling noImplicitAny in each package's tsconfig.json as it gets fixed, then removing the line from the root config. Public signatures must keep their current types (any made explicit rather than narrowed) to avoid breaking changes.

nawan-b avatar Oct 27 '26 15:10 nawan-b

Hi @erwanMarmelab, I'd like to help with this effort for my course PR requirement!

Could I take on enabling noImplicitAny for the ra-data-json-server package (and ra-i18n-i18next)?

I'll make sure to retain all current public signatures with explicit types to avoid any breaking changes.

rishitha2625 avatar Nov 09 '26 19:11 rishitha2625

Hi @erwanMarmelab , I'd like to take on enabling noImplicitAny for ra-input-rich-text. I'll make sure to preserve all existing public signatures with explicit types to avoid any breaking changes. Opening a PR shortly!

shikhar1est avatar Nov 13 '26 06:11 shikhar1est

Hi @rishitha2625, Hi @shikhar1est,

Thank you for your contributions and thank you for your PRs.

We don't have much time right now to test this work, but this task has been added to our backlog.

nawan-b avatar Nov 16 '26 16:11 nawan-b