Skip to content

Commit 05b2f9c

Browse files
committed
fix: typos in function names
1 parent b619e1a commit 05b2f9c

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/rules/immutable-data.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
} from "#eslint-plugin-functional/utils/rule";
2626
import {
2727
findRootIdentifier,
28-
isDefinedByMutableVaraible,
28+
isDefinedByMutableVariable,
2929
isInConstructor,
3030
} from "#eslint-plugin-functional/utils/tree";
3131
import {
@@ -199,7 +199,7 @@ function checkAssignmentExpression(
199199
const rootIdentifier = findRootIdentifier(node.left.object);
200200
if (
201201
rootIdentifier !== undefined &&
202-
isDefinedByMutableVaraible(rootIdentifier, context)
202+
isDefinedByMutableVariable(rootIdentifier, context)
203203
) {
204204
return {
205205
context,
@@ -252,7 +252,7 @@ function checkUnaryExpression(
252252
const rootIdentifier = findRootIdentifier(node.argument.object);
253253
if (
254254
rootIdentifier !== undefined &&
255-
isDefinedByMutableVaraible(rootIdentifier, context)
255+
isDefinedByMutableVariable(rootIdentifier, context)
256256
) {
257257
return {
258258
context,
@@ -304,7 +304,7 @@ function checkUpdateExpression(
304304
const rootIdentifier = findRootIdentifier(node.argument.object);
305305
if (
306306
rootIdentifier !== undefined &&
307-
isDefinedByMutableVaraible(rootIdentifier, context)
307+
isDefinedByMutableVariable(rootIdentifier, context)
308308
) {
309309
return {
310310
context,
@@ -400,7 +400,7 @@ function checkCallExpression(
400400
const rootIdentifier = findRootIdentifier(node.callee.object);
401401
if (
402402
rootIdentifier === undefined ||
403-
!isDefinedByMutableVaraible(rootIdentifier, context)
403+
!isDefinedByMutableVariable(rootIdentifier, context)
404404
) {
405405
return {
406406
context,
@@ -434,7 +434,7 @@ function checkCallExpression(
434434
const rootIdentifier = findRootIdentifier(node.callee.object);
435435
if (
436436
rootIdentifier === undefined ||
437-
!isDefinedByMutableVaraible(rootIdentifier, context)
437+
!isDefinedByMutableVariable(rootIdentifier, context)
438438
) {
439439
return {
440440
context,

src/rules/prefer-immutable-types.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,20 +342,20 @@ function getAllFixers(
342342
const fix =
343343
fixerConfigs === false
344344
? null
345-
: getConfiuredFixer(node, nodeText, fixerConfigs);
345+
: getConfiguredFixer(node, nodeText, fixerConfigs);
346346

347347
const suggestionFixers =
348348
suggestionsConfigs === false
349349
? null
350-
: getConfiuredSuggestionFixers(node, nodeText, suggestionsConfigs);
350+
: getConfiguredSuggestionFixers(node, nodeText, suggestionsConfigs);
351351

352352
return { fix, suggestionFixers };
353353
}
354354

355355
/**
356356
* Get a fixer that uses the user config.
357357
*/
358-
function getConfiuredFixer(
358+
function getConfiguredFixer(
359359
node: TSESTree.Node,
360360
text: string,
361361
configs: FixerConfig[],
@@ -371,7 +371,7 @@ function getConfiuredFixer(
371371
/**
372372
* Get a fixer that uses the user config.
373373
*/
374-
function getConfiuredSuggestionFixers(
374+
function getConfiguredSuggestionFixers(
375375
node: TSESTree.Node,
376376
text: string,
377377
suggestionsConfigs: SuggestionsConfig[],
@@ -751,7 +751,7 @@ function checkFunction(
751751
/**
752752
* Check if the given function node violates this rule.
753753
*/
754-
function checkVarible(
754+
function checkVariable(
755755
node: TSESTree.VariableDeclarator | TSESTree.PropertyDefinition,
756756
context: Readonly<RuleContext<keyof typeof errorMessages, Options>>,
757757
options: Readonly<Options>,
@@ -931,7 +931,7 @@ export const rule = createRule<keyof typeof errorMessages, Options>(
931931
TSEmptyBodyFunctionExpression: checkFunction,
932932
TSFunctionType: checkFunction,
933933
TSMethodSignature: checkFunction,
934-
PropertyDefinition: checkVarible,
935-
VariableDeclarator: checkVarible,
934+
PropertyDefinition: checkVariable,
935+
VariableDeclarator: checkVariable,
936936
},
937937
);

src/rules/type-declaration-immutability.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function getRuleToApply(
272272
/**
273273
* Get a fixer that uses the user config.
274274
*/
275-
function getConfiuredFixer<T extends TSESTree.Node>(
275+
function getConfiguredFixer<T extends TSESTree.Node>(
276276
node: T,
277277
context: Readonly<RuleContext<keyof typeof errorMessages, Options>>,
278278
configs: FixerConfig[],
@@ -329,7 +329,7 @@ function getResults(
329329
const fix =
330330
rule.fixers === false || isTSInterfaceDeclaration(node)
331331
? null
332-
: getConfiuredFixer(node.typeAnnotation, context, rule.fixers);
332+
: getConfiguredFixer(node.typeAnnotation, context, rule.fixers);
333333

334334
return {
335335
context,

src/utils/tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export function getKeyOfValueInObjectExpression(
271271
/**
272272
* Is the given identifier defined by a mutable variable (let or var)?
273273
*/
274-
export function isDefinedByMutableVaraible<
274+
export function isDefinedByMutableVariable<
275275
Context extends RuleContext<string, BaseOptions>,
276276
>(node: TSESTree.Identifier, context: Context) {
277277
const services = getParserServices(context);

0 commit comments

Comments
 (0)