File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
33
33
* [ Docs] [ ` jsx-boolean-value ` ] : add jsdoc types for helper functions ([ #3344 ] [ ] @caroline223 )
34
34
* [ readme] remove dead codeclimate badge, add actions badge (@ljharb )
35
35
* [ readme] Remove dead david-dm badge ([ #3262 ] [ ] @ddzz )
36
+ * [ Refactor] [ ` jsx-closing-bracket-location ` ] , [ ` jsx-no-bind ` ] : fix eslint issues ([ #3351 ] [ ] @caroline223 )
36
37
37
38
[ #3353 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3353
39
+ [ #3351 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3351
38
40
[ #3350 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3350
39
41
[ #3349 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3349
40
42
[ #3347 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3347
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ module.exports = {
165
165
* @return {String } The characters used for indentation
166
166
*/
167
167
function getIndentation ( tokens , expectedLocation , correctColumn ) {
168
- correctColumn = correctColumn || 0 ;
168
+ const newColumn = correctColumn || 0 ;
169
169
let indentation ;
170
170
let spaces = [ ] ;
171
171
switch ( expectedLocation ) {
@@ -179,7 +179,7 @@ module.exports = {
179
179
default :
180
180
indentation = '' ;
181
181
}
182
- if ( indentation . length + 1 < correctColumn ) {
182
+ if ( indentation . length + 1 < newColumn ) {
183
183
// Non-whitespace characters were included in the column offset
184
184
spaces = new Array ( + correctColumn + 1 - indentation . length ) ;
185
185
}
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ module.exports = {
69
69
// bind expression or an arrow function in different block statements
70
70
const blockVariableNameSets = { } ;
71
71
72
+ /**
73
+ * @param {string | number } blockStart
74
+ */
72
75
function setBlockVariableNameSet ( blockStart ) {
73
76
blockVariableNameSets [ blockStart ] = {
74
77
arrowFunc : new Set ( ) ,
@@ -80,7 +83,6 @@ module.exports = {
80
83
81
84
function getNodeViolationType ( node ) {
82
85
const nodeType = node . type ;
83
-
84
86
if (
85
87
! configuration . allowBind
86
88
&& nodeType === 'CallExpression'
@@ -111,6 +113,11 @@ module.exports = {
111
113
return null ;
112
114
}
113
115
116
+ /**
117
+ * @param {string | number } violationType
118
+ * @param {any } variableName
119
+ * @param {string | number } blockStart
120
+ */
114
121
function addVariableNameToSet ( violationType , variableName , blockStart ) {
115
122
blockVariableNameSets [ blockStart ] [ violationType ] . add ( variableName ) ;
116
123
}
You can’t perform that action at this time.
0 commit comments