Skip to content
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

[explicit-module-boundary-types] Explicit module boundary types expects private arrow function to be typed #1740

Closed
Jamesernator opened this issue Mar 16, 2020 · 2 comments · Fixed by #4046
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@Jamesernator
Copy link
Contributor

Repro

{
  "rules": {
    "@typescript-eslint/explicit-module-boundary-types": "error"
  }
}
class Foo {
  #x = () => 12;
}

Expected Result

No error.

Actual Result

Missing return type on function.eslint(@typescript-eslint/explicit-module-boundary-types).

Additional Info

This doesn't affects fields like #x = 12 or #x = foo(), only seen it on arrow functions.

Versions

package version
@typescript-eslint/eslint-plugin 2.23.0
@typescript-eslint/parser 2.23.0
TypeScript 3.8.3
ESLint 6.8.0
node 13.11.0
npm 6.13.7
@Jamesernator Jamesernator added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Mar 16, 2020
@Jamesernator Jamesernator changed the title [explicit-module-boundary-types] Explicit module boundary types doesn't ignore private field functions [explicit-module-boundary-types] Explicit module boundary types expects private arrow function to be typed Mar 16, 2020
@bradzacher
Copy link
Member

#1436

@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Mar 16, 2020
@bradzacher bradzacher modified the milestone: 4.0.0 Jul 2, 2020
@ghost
Copy link

ghost commented Sep 8, 2021

Not just on arrow functions, I see this on non-arrow function class methods:

class A {
  #method() {
  }
}

@JoshuaKGoldberg JoshuaKGoldberg added the accepting prs Go ahead, send a pull request that resolves this issue label Oct 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
3 participants