Skip to content

Commit

Permalink
Chore: improve a few comments and fix typos (#14125)
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed Feb 22, 2021
1 parent e19c51e commit 87c43a5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/rules/indent-legacy.js
Expand Up @@ -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
*/
Expand Down
8 changes: 4 additions & 4 deletions lib/rules/no-loss-of-precision.js
Expand Up @@ -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));
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/prefer-destructuring.js
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/use-isnan.js
Expand Up @@ -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}
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/config-extends/error.json
@@ -1,3 +1,3 @@
{
"extends": "./non-existant.json"
"extends": "./non-existent.json"
}
4 changes: 2 additions & 2 deletions tests/lib/rules/indent.js
Expand Up @@ -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
//----------------------------------------------------------------------

Expand Down Expand Up @@ -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
//----------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-restricted-exports.js
Expand Up @@ -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"] }] },
Expand Down

0 comments on commit 87c43a5

Please sign in to comment.