File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ module.exports = {
165165 * @return {String } The characters used for indentation
166166 */
167167 function getIndentation ( tokens , expectedLocation , correctColumn ) {
168- correctColumn = correctColumn || 0 ;
168+ const newColumn = correctColumn || 0 ;
169169 let indentation ;
170170 let spaces = [ ] ;
171171 switch ( expectedLocation ) {
@@ -179,7 +179,7 @@ module.exports = {
179179 default :
180180 indentation = '' ;
181181 }
182- if ( indentation . length + 1 < correctColumn ) {
182+ if ( indentation . length + 1 < newColumn ) {
183183 // Non-whitespace characters were included in the column offset
184184 spaces = new Array ( + correctColumn + 1 - indentation . length ) ;
185185 }
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ module.exports = {
6969 // bind expression or an arrow function in different block statements
7070 const blockVariableNameSets = { } ;
7171
72+ /**
73+ * @param {string | number } blockStart
74+ */
7275 function setBlockVariableNameSet ( blockStart ) {
7376 blockVariableNameSets [ blockStart ] = {
7477 arrowFunc : new Set ( ) ,
@@ -80,7 +83,6 @@ module.exports = {
8083
8184 function getNodeViolationType ( node ) {
8285 const nodeType = node . type ;
83-
8486 if (
8587 ! configuration . allowBind
8688 && nodeType === 'CallExpression'
@@ -111,6 +113,11 @@ module.exports = {
111113 return null ;
112114 }
113115
116+ /**
117+ * @param {string | number } violationType
118+ * @param {any } variableName
119+ * @param {string | number } blockStart
120+ */
114121 function addVariableNameToSet ( violationType , variableName , blockStart ) {
115122 blockVariableNameSets [ blockStart ] [ violationType ] . add ( variableName ) ;
116123 }
You can’t perform that action at this time.
0 commit comments