Skip to content

Tracking issue for noZeroFractions #9829

@coderabbitai

Description

@coderabbitai

Overview

This issue tracks the work needed to extend the noZeroFractions lint rule — currently implemented for JavaScript/TypeScript — to other languages where trailing zeros in numeric literals are also redundant.

Originally discussed in #9817.

TODO

  • CSS: Implement a CSS version of noZeroFractions. Stylelint has a comparable rule: number-no-trailing-zeros.
  • JSON: Implement a JSON version of noZeroFractions. Trailing zeros in JSON numeric values (e.g. 1.0) are redundant and can be simplified to 1.

Out of scope

  • GraphQL: GraphQL distinguishes between float and integer types — 1.0 is a Float while 1 is an Int, so removing trailing zeros would change semantics. This rule should not be applied to GraphQL.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions