I can't seem to figure out a way to use this rule react/jsx-filename-extension with typescript.
"react/jsx-filename-extension": [1, {
"extensions": [".jsx", ".tsx"]
}],
This does not seem to work. I have tried it with both babel-eslint and @typescript-eslint/parser but still throws a warning
What warning, on what filename?
Tsx file that says it can't take jsx, despite the above config clearly
allowing it
On Sat, May 18, 2019, 14:33 Jordan Harband notifications@github.com wrote:
What warning, on what filename?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/yannickcr/eslint-plugin-react/issues/2282?email_source=notifications&email_token=AAOCUZKGZUZPYTDMUZPHNPLPV6PNHA5CNFSM4HNXLQVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVWIXNQ#issuecomment-493652918,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOCUZI4R6MZ2PRE3W2GZOTPV6PNHANCNFSM4HNXLQVA
.
What is the exact text of the warning, and where are you seeing it? If in your editor, what does the command line say?
Seems like my tsconfig was not being taken into account. All sorted
@cyrus-za How did you exactly fix this issue?
@cyrus-za Can you please share your solution?
@cyrus-za any news?
Sorry guys. I haven't been keeping a close eye on these threads. I can't recall exactly what I did, but it had something to do with paths or not specifying the tsconfig file or something like that. I hope it helps
I had the same problem, what did realy help was to re-launch my vscode with the rule:
"react/jsx-filename-extension": [1, {
"extensions": [".tsx"]
To make that a little more clear, in your .eslintrc:
"rules": {
"react/jsx-filename-extension": [1,
{
"extensions": [
".tsx"
]
}
]
}
Most helpful comment
@cyrus-za How did you exactly fix this issue?