Skip to content

jsonc/no-floating-decimal

disallow leading or trailing decimal points in numeric literals

  • ⚙️ This rule is included in "plugin:jsonc/recommended-with-json" and "plugin:jsonc/recommended-with-jsonc".
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule is aimed at eliminating floating decimal points and will warn whenever a numeric value has a decimal point but is missing a number either before or after it.

Cannot use floating decimal points when in JSON and JSONC.

Now loading...

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-jsonc v0.9.0

🔍 Implementation

Taken with ❤️ from ESLint core