ni / ni/javascript-styleguide

Consider enabling rule to enforce using Number statics

Open
#188 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
JavaScript
Stars
9
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Should prefer the Number.* static functions over the bare globals, i.e. Number.isNaN vs isNaN.

See: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md

Edit: unrelated, but some of these lint rules really speak to me

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked prefer-number-properties rule documentation, then locate the repository's ESLint configuration and review how existing rules are enabled. Enable the requested rule and run the project's lint checks to confirm bare globals are reported and existing code passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.