@@ -50,17 +50,14 @@ function withThisParam(this, a, b, c, d, e, f, g) {
5050
5151# Diagnostics
5252` ` `
53- invalid.js:1:1 lint/nursery/useMaxParams ━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
53+ invalid.js:1:23 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5454
5555 ! Function has 8 parameters, but only 4 are allowed.
5656
5757 > 1 │ function tooManyParams(a, b, c, d, e, f, g, h) {
58- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59- > 2 │ return a + b + c + d + e + f + g + h ;
60- > 3 │ }
61- │ ^
62- 4 │
63- 5 │ function namedFunction(a, b, c, d, e, f, g, h, i) {
58+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
59+ 2 │ return a + b + c + d + e + f + g + h ;
60+ 3 │ }
6461
6562 i Functions with many parameters are hard to read and maintain.
6663
@@ -70,19 +67,16 @@ invalid.js:1:1 lint/nursery/useMaxParams ━━━━━━━━━━━━━
7067` ` `
7168
7269` ` `
73- invalid .js :5 :1 lint / nursery / useMaxParams ━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
70+ invalid.js:5:23 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7471
7572 ! Function has 9 parameters, but only 4 are allowed.
7673
7774 3 │ }
7875 4 │
7976 > 5 │ function namedFunction(a, b, c, d, e, f, g, h, i) {
80- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81- > 6 │ return a + b + c + d + e + f + g + h + i ;
82- > 7 │ }
83- │ ^
84- 8 │
85- 9 │ const fn1 = function(a, b, c, d, e, f, g, h) {
77+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
78+ 6 │ return a + b + c + d + e + f + g + h + i ;
79+ 7 │ }
8680
8781 i Functions with many parameters are hard to read and maintain.
8882
@@ -92,19 +86,16 @@ invalid.js:5:1 lint/nursery/useMaxParams ━━━━━━━━━━━━━
9286` ` `
9387
9488` ` `
95- invalid .js :9 :13 lint / nursery / useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
89+ invalid.js:9:21 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9690
9791 ! Function has 8 parameters, but only 4 are allowed.
9892
9993 7 │ }
10094 8 │
10195 > 9 │ const fn1 = function(a, b, c, d, e, f, g, h) {
102- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103- > 10 │ return a + b + c + d + e + f + g + h ;
104- > 11 │ } ;
105- │ ^
106- 12 │
107- 13 │ const fn2 = function namedFnExpression(a, b, c, d, e, f, g, h, i) {
96+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
97+ 10 │ return a + b + c + d + e + f + g + h ;
98+ 11 │ } ;
10899
109100 i Functions with many parameters are hard to read and maintain.
110101
@@ -114,19 +105,16 @@ invalid.js:9:13 lint/nursery/useMaxParams ━━━━━━━━━━━━
114105` ` `
115106
116107` ` `
117- invalid .js :13 :13 lint / nursery / useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
108+ invalid.js:13:39 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
118109
119110 ! Function has 9 parameters, but only 4 are allowed.
120111
121112 11 │ };
122113 12 │
123114 > 13 │ const fn2 = function namedFnExpression(a, b, c, d, e, f, g, h, i) {
124- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125- > 14 │ return a + b + c + d + e + f + g + h + i ;
126- > 15 │ } ;
127- │ ^
128- 16 │
129- 17 │ const arrow1 = (a, b, c, d, e, f, g, h) => {
115+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
116+ 14 │ return a + b + c + d + e + f + g + h + i ;
117+ 15 │ } ;
130118
131119 i Functions with many parameters are hard to read and maintain.
132120
@@ -143,12 +131,9 @@ invalid.js:17:16 lint/nursery/useMaxParams ━━━━━━━━━━━━
143131 15 │ };
144132 16 │
145133 > 17 │ const arrow1 = (a, b, c, d, e, f, g, h) => {
146- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147- > 18 │ return a + b + c + d + e + f + g + h ;
148- > 19 │ } ;
149- │ ^
150- 20 │
151- 21 │ const arrow2 = (a, b, c, d, e, f, g, h, i) => a + b + c + d + e + f + g + h + i;
134+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
135+ 18 │ return a + b + c + d + e + f + g + h ;
136+ 19 │ } ;
152137
153138 i Functions with many parameters are hard to read and maintain.
154139
@@ -165,7 +150,7 @@ invalid.js:21:16 lint/nursery/useMaxParams ━━━━━━━━━━━━
165150 19 │ };
166151 20 │
167152 > 21 │ const arrow2 = (a, b, c, d, e, f, g, h, i) => a + b + c + d + e + f + g + h + i;
168- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
169154 22 │
170155 23 │ class MyClass {
171156
@@ -177,18 +162,15 @@ invalid.js:21:16 lint/nursery/useMaxParams ━━━━━━━━━━━━
177162` ` `
178163
179164` ` `
180- invalid .js :24 :5 lint / nursery / useMaxParams ━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
165+ invalid .js :24 :11 lint / nursery / useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
181166
182167 ! Function has 8 parameters , but only 4 are allowed .
183168
184169 23 │ class MyClass {
185170 > 24 │ method(a , b , c , d , e , f , g , h ) {
186- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187- > 25 │ return a + b + c + d + e + f + g + h ;
188- > 26 │ }
189- │ ^
190- 27 │
191- 28 │ constructor (a , b , c , d , e , f , g , h , i ) {
171+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
172+ 25 │ return a + b + c + d + e + f + g + h ;
173+ 26 │ }
192174
193175 i Functions with many parameters are hard to read and maintain .
194176
@@ -198,19 +180,16 @@ invalid.js:24:5 lint/nursery/useMaxParams ━━━━━━━━━━━━
198180` ` `
199181
200182` ` `
201- invalid .js :28 :5 lint / nursery / useMaxParams ━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183+ invalid .js : 28 :16 lint /nursery /useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
202184
203185 ! Function has 9 parameters , but only 4 are allowed .
204186
205187 26 │ }
206188 27 │
207189 > 28 │ constructor (a , b , c , d , e , f , g , h , i ) {
208- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209- > 29 │ this .sum = a + b + c + d + e + f + g + h + i ;
210- > 30 │ }
211- │ ^
212- 31 │ }
213- 32 │
190+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
191+ 29 │ this.sum = a + b + c + d + e + f + g + h + i;
192+ 30 │ }
214193
215194 i Functions with many parameters are hard to read and maintain .
216195
@@ -220,18 +199,15 @@ invalid.js:28:5 lint/nursery/useMaxParams ━━━━━━━━━━━━
220199` ` `
221200
222201` ` `
223- invalid .js :34 :5 lint / nursery / useMaxParams ━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
202+ invalid .js :34 :11 lint / nursery / useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
224203
225204 ! Function has 8 parameters , but only 4 are allowed .
226205
227206 33 │ const obj = {
228207 > 34 │ method(a , b , c , d , e , f , g , h ) {
229- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230- > 35 │ return a + b + c + d + e + f + g + h ;
231- > 36 │ }
232- │ ^
233- 37 │ };
234- 38 │
208+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
209+ 35 │ return a + b + c + d + e + f + g + h ;
210+ 36 │ }
235211
236212 i Functions with many parameters are hard to read and maintain.
237213
@@ -241,18 +217,16 @@ invalid.js:34:5 lint/nursery/useMaxParams ━━━━━━━━━━━━
241217```
242218
243219```
244- invalid .js :39 :1 lint / nursery / useMaxParams ━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
220+ invalid.js:39 :23 lint / nursery / useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
245221
246222 ! Function has 8 parameters , but only 4 are allowed.
247223
248224 37 │ };
249225 38 │
250226 > 39 │ function withThisParam(this , a , b , c , d , e , f , g ) {
251- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
252- > 40 │ return a + b + c + d + e + f + g ;
253- > 41 │ }
254- │ ^
255- 42 │
227+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
228+ 40 │ return a + b + c + d + e + f + g ;
229+ 41 │ }
256230
257231 i Functions with many parameters are hard to read and maintain .
258232
0 commit comments