Skip to content

Check JavaScript: require flagged as error in simple node project #15632

@egamma

Description

@egamma

Please see the screenshot below. Since this workspace has a package.json I would have expected that this is recognized as commonJS project:

image

When adding a jsconfig.json with module: commonJs then require is no longer marked as an error.

{
    "compilerOptions": {
        "module": "commonjs",
        "checkJs": true
    }
}

// CC @mjbvz

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions