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

Update: Add enforceForIndexOf option to use-isnan (fixes #12207)#12379

Merged
platinumazure merged 2 commits intomasterfrom
issue12207
Oct 25, 2019
Merged

Update: Add enforceForIndexOf option to use-isnan (fixes #12207)#12379
platinumazure merged 2 commits intomasterfrom
issue12207

Conversation

@mdjermanovic
Copy link
Member

What is the purpose of this pull request? (put an "X" next to item)

[X] Changes an existing rule#12207

Examples ofincorrect code for this rule with"enforceForIndexOf" option set totrue:

/*eslint use-isnan: ["error", {"enforceForIndexOf": true}]*/varhasNaN=myArray.indexOf(NaN)>=0;varfirstIndex=myArray.indexOf(NaN);varlastIndex=myArray.lastIndexOf(NaN);

What changes did you make? (Give an overview)

New optionenforceForIndexOf in theuse-isnan rule.

Is there anything you'd like reviewers to focus on?

It seemed too complex to have an advice in the message since it depends on whether the user wants to find index or just check for existence, and also what environments are available. There are examples in the docs for different environments.

@mdjermanovicmdjermanovic added enhancementThis change enhances an existing feature of ESLint ruleRelates to ESLint's core rules acceptedThere is consensus among the team that this change meets the criteria for inclusion labelsOct 5, 2019
@platinumazure
Copy link
Member

This looks good to me, but I'll leave it open another day or two in case other team members want to review.

Sorry for letting this slip through the cracks.

@platinumazureplatinumazure merged commitc6a9a3b intomasterOct 25, 2019
@platinumazureplatinumazure deleted the issue12207 branchOctober 25, 2019 18:09
@eslint-deprecatedeslint-deprecatedbot locked and limited conversation to collaboratorsApr 24, 2020
@eslint-deprecatedeslint-deprecatedbot added the archived due to ageThis issue has been archived; please open a new issue for any further discussion labelApr 24, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

1 more reviewer

@platinumazureplatinumazureplatinumazure approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintruleRelates to ESLint's core rules

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mdjermanovic@platinumazure

[8]ページ先頭

©2009-2026 Movatter.jp