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/typescriptfor compiling typescript to js using babel@typescript-eslintand needed sub-packages for linting typescriptno-unused-varsin 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.jsonwhich controls the type validation one will see in VSCode, and the result of explicitly runningtsccheck-typesscript that is added toprepareto check types prior to compilationOnce this is merged, the actual work of typescript conversion may commence