8000 [explicit-module-boundary-types] does not recognise `export =` · Issue #1583 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

[explicit-module-boundary-types] does not recognise export = 8000 #1583

New issue

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

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

Already on GitHub? Sign in to your account

Closed
SimenB opened this issue Feb 9, 2020 · 1 comment
Closed

[explicit-module-boundary-types] does not recognise export = #1583

SimenB opened this issue Feb 9, 2020 · 1 comment
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@SimenB
Copy link
Contributor
SimenB commented Feb 9, 2020

Repro

{
  "rules": {
    "@typescript-eslint/explicit-module-boundary-types": "error"
  }
}
class Class {
  bool() {
    return true;
  }
}

export = Class;

Expected Result

Warning about not typing the bool function.

Actual Result

No warning.

Additional Info

Doing export default class Class { will make it warn correctly.

Versions

package version
@typescript-eslint/eslint-plugin 2.19.0
@typescript-eslint/parser 2.19.0
TypeScript 3.7.5
ESLint 6.8.0
node 12.15.0
yarn 1.21.1
@SimenB SimenB added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Feb 9, 2020
@bradzacher bradzacher added bug Something isn't working enhancement New feature or request and removed triage Waiting for team members to take a look bug Something isn't working enhancement New feature or request labels Feb 10, 2020
@bradzacher
Copy link
M 8000 ember

This isn't just the rule recognising export = (it wasn't built to recognise it).

For your example, it also won't work because it doesn't track references right now.
The rule would similarly error on:

class Foo{}
export default Foo

@bradzacher bradzacher added the has pr there is a PR raised to close this label Mar 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants
0