Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: [email protected]/rules.d.ts contains TS error #7261

@abrahamguo

Description

@abrahamguo

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

When installing @typescript-eslint/[email protected] and importing it into a TS file (which causes it to be type-checked), @typescript-eslint/eslint-plugin/rules.d.ts throws the following TypeScript error (with the latest version of TypeScript, 5.1.6):

node_modules/@typescript-eslint/eslint-plugin/rules.d.ts:44:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.
44 export = rules;

This is using the following tsconfig.json:

{
	"compilerOptions": {
		"allowSyntheticDefaultImports": true,
		"moduleResolution": "nodenext",
		"target": "esnext"
	}
}

Reproduction Repository Link

https://github.com/typescript-eslint/typescript-eslint/files/12080240/repro.zip

Repro Steps

  1. download and extract repro.zip
  2. npm i
  3. npx tsc

Versions

package version
@typescript-eslint/eslint-plugin 6.1.0
@typescript-eslint/parser 6.1.0
@typescript-eslint/scope-manager 6.1.0
@typescript-eslint/typescript-estree 6.1.0
@typescript-eslint/type-utils 6.1.0
@typescript-eslint/utils 6.1.0
TypeScript 5.1.6
ESLint 8.45.0
node 20.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions