Skip to content

Errors on type assertion, "extends" generics, and components with generics. #10488

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
colshacol opened this issue Feb 2, 2021 · 1 comment

Comments

@colshacol
Copy link

Working on a new project at work, but I can't run the app like everybody else can. I get a lot of TS errors that they don't get.

We're all operating on WSL. Any idea what could be up? -- Or should I take this to the TS repo instead?

        "react-scripts": "^4.0.1",
        "typescript": "4.1.3"

image

image

image

image

@RiverTwilight
Copy link

I solved this problem by adding this to package.json:

"eslintConfig": {
		"extends": [
			"react-app",
			"react-app/jest"
		],
		"overrides": [
			{
				"files": [
					"**/*.ts?(x)"
				],
				"rules": {
					"no-console": "off"
				}
			}
		]
	},

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants