Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: improve a few comments and fix typos #14125

Merged
merged 1 commit into from Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error.json test config does not seem to be currently used in this repo, but the change makes sense.

}
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