Skip to content
Permalink
Browse files
Chore: improve a few comments and fix typos (#14125)
  • Loading branch information
tniessen committed Feb 22, 2021
1 parent e19c51e commit 87c43a5d7ea2018cffd6d9b5c431ecb60caaf0d6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
@@ -954,7 +954,7 @@ module.exports = {
}

/**
* Checks wether a return statement is wrapped in ()
* Checks whether a return statement is wrapped in ()
* @param {ASTNode} node node to examine
* @returns {boolean} the result
*/
@@ -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);
@@ -168,7 +168,7 @@ module.exports = {
* Assignment expression is not fixed.
* Array destructuring is not fixed.
* Renamed property is not fixed.
* @param {ASTNode} node the the node to evaluate
* @param {ASTNode} node the node to evaluate
* @returns {boolean} whether or not the node should be fixed
*/
function shouldFix(node) {
@@ -101,7 +101,7 @@ module.exports = {
}

/**
* Checks the the given `CallExpression` node for `.indexOf(NaN)` and `.lastIndexOf(NaN)`.
* Checks the given `CallExpression` node for `.indexOf(NaN)` and `.lastIndexOf(NaN)`.
* @param {ASTNode} node The node to check.
* @returns {void}
*/
@@ -1,3 +1,3 @@
{
"extends": "./non-existant.json"
"extends": "./non-existent.json"
}
@@ -4145,7 +4145,7 @@ ruleTester.run("indent", rule, {
//----------------------------------------------------------------------
// JSX tests
// https://github.com/eslint/eslint/issues/8425
// Some of the following tests are adapted from the the tests in eslint-plugin-react.
// Some of the following tests are adapted from the tests in eslint-plugin-react.
// License: https://github.com/yannickcr/eslint-plugin-react/blob/7ca9841f22d599f447a27ef5b2a97def9229d6c8/LICENSE
//----------------------------------------------------------------------

@@ -9845,7 +9845,7 @@ ruleTester.run("indent", rule, {

//----------------------------------------------------------------------
// JSX tests
// Some of the following tests are adapted from the the tests in eslint-plugin-react.
// Some of the following tests are adapted from the tests in eslint-plugin-react.
// License: https://github.com/yannickcr/eslint-plugin-react/blob/7ca9841f22d599f447a27ef5b2a97def9229d6c8/LICENSE
//----------------------------------------------------------------------

@@ -58,7 +58,7 @@ ruleTester.run("no-restricted-exports", rule, {
{ code: "export { a } from 'foo';", options: [{ restrictedNamedExports: ["x"] }] },
{ code: "export { b as a } from 'foo';", options: [{ restrictedNamedExports: ["x"] }] },

// does not mistakenly disallow non-exported identifers that appear in named export declarations
// does not mistakenly disallow non-exported identifiers that appear in named export declarations
{ code: "export var b = a;", options: [{ restrictedNamedExports: ["a"] }] },
{ code: "export let [b = a] = [];", options: [{ restrictedNamedExports: ["a"] }] },
{ code: "export const [b] = [a];", options: [{ restrictedNamedExports: ["a"] }] },

0 comments on commit 87c43a5

Please sign in to comment.