-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scaffolding for typescript #3504
Conversation
Deploy preview for redux-docs ready! Built with commit 1b1078c |
Looks like eslint-plugin-import got dropped from the lockfile somehow. Try another npm install and that should fix the CI failure. |
Guys we are using |
@JustFly1984 : I've looked at |
Btw you don't need eslint-plugin-import for typescript, more than that - it just doesn't support TS |
I just created a new |
The PR addresses this issue. If 'no-unused-vars': 'off', and then replace it with the typescript version here: '@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
argsIgnorePattern: '^_' // ignore unused variables whose name is '_'
}
] I spent many long hours in a past project trying to figure this out :). If you have a better solution, let's make it happen! |
ah - I did not look at |
OK, so feedback needed here - the For now, I'm adding it to |
I'm happy with just getting rid of that example. I really don't see it adding much value to Redux. It's for Flow users, not Redux users. |
Well, actually you don’t need create-React-app preset either, you can use eslint-plugin-React, eslint-plugin-React-hooks, eslint-plugin-React-perf and that will be enough. |
This PR sets up the project to use typescript. It does not yet change any of the actual functionality.
It adds:
@babel/typescript
for compiling typescript to js using babel@typescript-eslint
and needed sub-packages for linting typescriptno-unused-vars
in favor of@typescript-eslint/no-unused-vars
, and adds a new strict rule exception - any variable whose name starts with '_' can be ignored as unusedtsconfig.json
which controls the type validation one will see in VSCode, and the result of explicitly runningtsc
check-types
script that is added toprepare
to check types prior to compilationOnce this is merged, the actual work of typescript conversion may commence