Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(eslint-plugin): add prefer-function-type rule#222

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

uniqueiniquity
Copy link
Contributor

Add rule equivalent to TSLint's 'callable-types'.

@bradzacher
Copy link
Member

@armano2 /@JamesHenry - why do we "support"implements on interfaces?

Typescript errors out if you try it?
https://www.typescriptlang.org/play/#src=interface%20Bar%20%7B%0D%0A%0D%0A%7D%0D%0A%0D%0Ainterface%20Foo%20implements%20Bar%20%7B%0D%0A%20%20%0D%0A%7D

uniqueiniquity reacted with thumbs up emoji

@armano2
Copy link
Collaborator

armano2 commentedFeb 6, 2019
edited
Loading

we errors on them to, if user setserrorOnTypeScriptSyntacticAndSemanticIssues but right now we are outputting ast with "invalid" nodes to, this should not be handled in this rule, and it should be ignored during linting

@armano2
Copy link
Collaborator

you can find a little more info here:#185 (comment)

@armano2
Copy link
Collaborator

if we are going to be able to get semantic errors in "cheap" way without creating program, i'm going to cleanup AST from all invalid nodes, right now prettier expects that we are going to output ast as is, and they can rebuild it without changing functionality only style

@j-f1
Copy link
Contributor

j-f1 commentedFeb 6, 2019

Should this have a different name? Perhapsprefer-function-type?

@uniqueiniquity
Copy link
ContributorAuthor

@j-f1 I'm open for naming suggestions. I was just matching TSLint's name, since I don't have a good sense of the ESLint rule naming conventions

@bradzacher
Copy link
Member

(hint: we don't really have any solid naming conventions yet 😅 )

armano2 reacted with laugh emoji

Copy link
Member

@JamesHenryJamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, but now that it's been pointed out, I agree the name could be a lot clearer

@bradzacher
Copy link
Member

Code LGMT - change the name and we're good to go

@JamesHenry
Copy link
Member

Apologies for the conflicts, we decided to remove the counts from the ROADMAP here:#225

They are too awkward to maintain manually, so this is the last time you will have to deal with syncing that up!

armano2
armano2 previously approved these changesFeb 7, 2019
Copy link
Member

@JamesHenryJamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Awesome, thanks!

@codecov
Copy link

codecovbot commentedFeb 8, 2019
edited
Loading

Codecov Report

Merging#222 intomaster willincrease coverage by0.04%.
The diff coverage is100%.

@@            Coverage Diff             @@##           master     #222      +/-   ##==========================================+ Coverage   96.79%   96.83%   +0.04%==========================================  Files          56       57       +1       Lines        2525     2558      +33       Branches      374      374              ==========================================+ Hits         2444     2477      +33  Misses         42       42                Partials       39       39
Impacted FilesCoverage Δ
...es/eslint-plugin/lib/rules/prefer-function-type.js100% <100%> (ø)

@uniqueiniquityuniqueiniquity changed the titlefeat(eslint-plugin): add callable-types rulefeat(eslint-plugin): add prefer-function-types ruleFeb 8, 2019
@uniqueiniquityuniqueiniquity changed the titlefeat(eslint-plugin): add prefer-function-types rulefeat(eslint-plugin): add prefer-function-type ruleFeb 8, 2019
@uniqueiniquityuniqueiniquity merged commitb95c4cf intotypescript-eslint:masterFeb 8, 2019
@uniqueiniquityuniqueiniquity deleted the addCallableTypes branchFebruary 8, 2019 16:49
kaicataldo pushed a commit to kaicataldo/typescript-eslint that referenced this pull requestAug 27, 2019
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 21, 2020
Luckeu pushed a commit to Luckeu/typescript-eslint that referenced this pull requestJun 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher left review comments

@JamesHenryJamesHenryJamesHenry approved these changes

@armano2armano2armano2 left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@uniqueiniquity@bradzacher@armano2@j-f1@JamesHenry

[8]ページ先頭

©2009-2025 Movatter.jp