From c2304546e2897f461623cae1eb3bd4afd2a87234 Mon Sep 17 00:00:00 2001 From: Adam Postma Date: Thu, 11 Apr 2019 19:43:29 -0600 Subject: [PATCH] fix identifer to identifier typo - note missing (i) --- docs/develop/custom-rules/index.md | 2 +- src/rules/radixRule.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/develop/custom-rules/index.md b/docs/develop/custom-rules/index.md index ca5b1003721..f613d305eda 100644 --- a/docs/develop/custom-rules/index.md +++ b/docs/develop/custom-rules/index.md @@ -6,7 +6,7 @@ permalink: "/develop/custom-rules/" TSLint ships with a set of core rules that can be configured. However, users are also allowed to write their own rules, which allows them to enforce specific behavior not covered by the core of TSLint. TSLint's internal rules are itself written to be pluggable, so adding a new rule is as simple as creating a new rule file named by convention. New rules can be written in either TypeScript or JavaScript; if written in TypeScript, the code must be compiled to JavaScript before invoking TSLint. -Let us take the example of how to write a new rule to forbid all import statements (you know, *for science*). Let us name the rule file `noImportsRule.ts`. Rules are referenced in `tslint.json` with their kebab-cased identifer, so `"no-imports": true` would configure the rule. +Let us take the example of how to write a new rule to forbid all import statements (you know, *for science*). Let us name the rule file `noImportsRule.ts`. Rules are referenced in `tslint.json` with their kebab-cased identifier, so `"no-imports": true` would configure the rule. __Important conventions__: diff --git a/src/rules/radixRule.ts b/src/rules/radixRule.ts index 5f3749a11bf..623177e1601 100644 --- a/src/rules/radixRule.ts +++ b/src/rules/radixRule.ts @@ -59,25 +59,25 @@ function isPropertyAccessParseInt( function isPropertyAccessOfIdentifier( expression: ts.LeftHandSideExpression, - identifers: string[], + identifiers: string[], ): expression is ts.PropertyAccessExpression { return ( isPropertyAccessExpression(expression) && isIdentifier(expression.expression) && - identifers.some(identifer => (expression.expression as ts.Identifier).text === identifer) + identifiers.some(identifier => (expression.expression as ts.Identifier).text === identifier) ); } function isPropertyAccessOfProperty( expression: ts.LeftHandSideExpression, - identifers: string[], + identifiers: string[], ): expression is ts.PropertyAccessExpression { return ( isPropertyAccessExpression(expression) && isPropertyAccessExpression(expression.expression) && - identifers.some( - identifer => - (expression.expression as ts.PropertyAccessExpression).name.text === identifer, + identifiers.some( + identifier => + (expression.expression as ts.PropertyAccessExpression).name.text === identifier, ) ); }