]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/rules/no-loss-of-precision.js
import 8.4.0 source
[pve-eslint.git] / eslint / lib / rules / no-loss-of-precision.js
index 9e2811809f68e788526de04076cc2df9ea744e72..fefc7b768fe9bca5d5d7a8a1684bc4ab7b2efa60 100644 (file)
@@ -9,14 +9,14 @@
 // Rule Definition
 //------------------------------------------------------------------------------
 
+/** @type {import('../shared/types').Rule} */
 module.exports = {
     meta: {
         type: "problem",
 
         docs: {
             description: "disallow literal numbers that lose precision",
-            category: "Possible Errors",
-            recommended: false,
+            recommended: true,
             url: "https://eslint.org/docs/rules/no-loss-of-precision"
         },
         schema: [],
@@ -105,9 +105,9 @@ module.exports = {
         }
 
         /**
-         * Converts an integer to to an object containing the the integer's coefficient and order of magnitude
+         * Converts an integer to to an object containing the integer's coefficient and order of magnitude
          * @param {string} stringInteger the string representation of the integer being converted
-         * @returns {Object} the object containing the the integer's coefficient and order of magnitude
+         * @returns {Object} the object containing the integer's coefficient and order of magnitude
          */
         function normalizeInteger(stringInteger) {
             const significantDigits = removeTrailingZeros(removeLeadingZeros(stringInteger));
@@ -120,9 +120,9 @@ module.exports = {
 
         /**
          *
-         * Converts a float to to an object containing the the floats's coefficient and order of magnitude
+         * Converts a float to to an object containing the floats's coefficient and order of magnitude
          * @param {string} stringFloat the string representation of the float being converted
-         * @returns {Object} the object containing the the integer's coefficient and order of magnitude
+         * @returns {Object} the object containing the integer's coefficient and order of magnitude
          */
         function normalizeFloat(stringFloat) {
             const trimmedFloat = removeLeadingZeros(stringFloat);