Skip to content

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

Open

Description

@colshacol

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

Activity

  1. rivertwilight commented on Feb 4, 2021

    @rivertwilight

    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"
    				}
    			}
    		]
    	},
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions