8000 [explicit-module-boundary-types] allowedNames doesn't work for arrow functions · Issue #4463 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

[explicit-module-boundary-types] allowedNames doesn't work for arrow functions #4463 8000

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
3 tasks done
NicBright opened this issue Jan 20, 2022 · 0 comments · Fixed by #4542
Closed
3 tasks done

[explicit-module-boundary-types] allowedNames doesn't work for arrow functions #4463

NicBright opened this issue Jan 20, 2022 · 0 comments · Fixed by #4542
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@NicBright
Copy link
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

See the following screenshot that directly illustrates the problem:
image

export class Repro {
    selectState = () => {
        someStateProp: 5;
    };
}

.eslintrc.json extract:

"@typescript-eslint/explicit-module-boundary-types": ["error", {
                    "allowedNames": ["selectState"]
                }]

Expected Result
The rule should allow my public selectState instance property to be assigned an untyped arrow function.

Actual Result

The rule disallows the assignment (see screenshot above).

Versions

package version
@typescript-eslint/eslint-plugin 5.10.0
@typescript-eslint/parser 5.10.0
TypeScript 4.3.5
ESLint 7.32.0
node 14.17.0
@NicBright NicBright added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Jan 20, 2022
@bradzacher bradzacher added accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request and removed triage Waiting for team members to take a look labels Jan 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
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 enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants
0