Skip to content

Commit 7a34ea9

Browse files
committed
[Tests] clean up whitespace
1 parent 2b6e529 commit 7a34ea9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4576
-4688
lines changed

tests/lib/rules/boolean-prop-naming.js

Lines changed: 222 additions & 221 deletions
Large diffs are not rendered by default.

tests/lib/rules/display-name.js

Lines changed: 252 additions & 354 deletions
Large diffs are not rendered by default.

tests/lib/rules/forbid-component-props.js

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ ruleTester.run('forbid-component-props', rule, {
4343
}
4444
});
4545
`,
46-
options: [
47-
{ forbid: ['style'] },
48-
],
46+
options: [{ forbid: ['style'] }],
4947
},
5048
{
5149
code: `
@@ -66,9 +64,7 @@ ruleTester.run('forbid-component-props', rule, {
6664
}
6765
});
6866
`,
69-
options: [
70-
{ forbid: ['style'] },
71-
],
67+
options: [{ forbid: ['style'] }],
7268
},
7369
{
7470
code: `
@@ -79,9 +75,7 @@ ruleTester.run('forbid-component-props', rule, {
7975
}
8076
});
8177
`,
82-
options: [
83-
{ forbid: ['style', 'foo'] },
84-
],
78+
options: [{ forbid: ['style', 'foo'] }],
8579
},
8680
{
8781
code: `
@@ -117,7 +111,10 @@ ruleTester.run('forbid-component-props', rule, {
117111
options: [
118112
{
119113
forbid: [
120-
{ propName: 'className', allowedFor: ['ReactModal'] },
114+
{
115+
propName: 'className',
116+
allowedFor: ['ReactModal'],
117+
},
121118
],
122119
},
123120
],
@@ -129,7 +126,10 @@ ruleTester.run('forbid-component-props', rule, {
129126
options: [
130127
{
131128
forbid: [
132-
{ propName: 'className', allowedFor: ['AntdLayout.Content'] },
129+
{
130+
propName: 'className',
131+
allowedFor: ['AntdLayout.Content'],
132+
},
133133
],
134134
},
135135
],
@@ -141,7 +141,10 @@ ruleTester.run('forbid-component-props', rule, {
141141
options: [
142142
{
143143
forbid: [
144-
{ propName: 'className', allowedFor: ['this.ReactModal'] },
144+
{
145+
propName: 'className',
146+
allowedFor: ['this.ReactModal'],
147+
},
145148
],
146149
},
147150
],
@@ -199,9 +202,7 @@ ruleTester.run('forbid-component-props', rule, {
199202
}
200203
});
201204
`,
202-
options: [
203-
{ forbid: ['className', 'style'] },
204-
],
205+
options: [{ forbid: ['className', 'style'] }],
205206
errors: [
206207
{
207208
messageId: 'propIsForbidden',
@@ -221,9 +222,7 @@ ruleTester.run('forbid-component-props', rule, {
221222
}
222223
});
223224
`,
224-
options: [
225-
{ forbid: ['className', 'style'] },
226-
],
225+
options: [{ forbid: ['className', 'style'] }],
227226
errors: [
228227
{
229228
messageId: 'propIsForbidden',
@@ -240,7 +239,10 @@ ruleTester.run('forbid-component-props', rule, {
240239
options: [
241240
{
242241
forbid: [
243-
{ propName: 'className', allowedFor: ['ReactModal'] },
242+
{
243+
propName: 'className',
244+
allowedFor: ['ReactModal'],
245+
},
244246
],
245247
},
246248
],
@@ -260,7 +262,10 @@ ruleTester.run('forbid-component-props', rule, {
260262
options: [
261263
{
262264
forbid: [
263-
{ propName: 'className', allowedFor: ['ReactModal'] },
265+
{
266+
propName: 'className',
267+
allowedFor: ['ReactModal'],
268+
},
264269
],
265270
},
266271
],
@@ -281,7 +286,10 @@ ruleTester.run('forbid-component-props', rule, {
281286
options: [
282287
{
283288
forbid: [
284-
{ propName: 'className', message: 'Please use ourCoolClassName instead of ClassName' },
289+
{
290+
propName: 'className',
291+
message: 'Please use ourCoolClassName instead of ClassName',
292+
},
285293
],
286294
},
287295
],
@@ -305,8 +313,14 @@ ruleTester.run('forbid-component-props', rule, {
305313
options: [
306314
{
307315
forbid: [
308-
{ propName: 'className', message: 'Please use ourCoolClassName instead of ClassName' },
309-
{ propName: 'option', message: 'Avoid using option' },
316+
{
317+
propName: 'className',
318+
message: 'Please use ourCoolClassName instead of ClassName',
319+
},
320+
{
321+
propName: 'option',
322+
message: 'Avoid using option',
323+
},
310324
],
311325
},
312326
],
@@ -337,7 +351,10 @@ ruleTester.run('forbid-component-props', rule, {
337351
{
338352
forbid: [
339353
{ propName: 'className' },
340-
{ propName: 'option', message: 'Avoid using option' },
354+
{
355+
propName: 'option',
356+
message: 'Avoid using option',
357+
},
341358
],
342359
},
343360
],
@@ -356,5 +373,6 @@ ruleTester.run('forbid-component-props', rule, {
356373
type: 'JSXAttribute',
357374
},
358375
],
359-
}],
376+
},
377+
],
360378
});

tests/lib/rules/forbid-elements.js

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ ruleTester.run('forbid-elements', rule, {
109109
},
110110
{
111111
code: '<dotted.component />',
112-
options: [
113-
{ forbid: ['dotted.component'] },
114-
],
112+
options: [{ forbid: ['dotted.component'] }],
115113
errors: [
116114
{
117115
messageId: 'forbiddenElement',
@@ -156,7 +154,8 @@ ruleTester.run('forbid-elements', rule, {
156154
options: [
157155
{
158156
forbid: [
159-
{ element: 'button' }, { element: 'input' },
157+
{ element: 'button' },
158+
{ element: 'input' },
160159
],
161160
},
162161
],
@@ -173,12 +172,7 @@ ruleTester.run('forbid-elements', rule, {
173172
},
174173
{
175174
code: '<button><input /></button>',
176-
options: [
177-
{
178-
forbid: [
179-
{ element: 'button' }, 'input'],
180-
},
181-
],
175+
options: [{ forbid: [{ element: 'button' }, 'input'] }],
182176
errors: [
183177
{
184178
messageId: 'forbiddenElement',
@@ -192,9 +186,7 @@ ruleTester.run('forbid-elements', rule, {
192186
},
193187
{
194188
code: '<button><input /></button>',
195-
options: [
196-
{ forbid: ['input', { element: 'button' }] },
197-
],
189+
options: [{ forbid: ['input', { element: 'button' }] }],
198190
errors: [
199191
{
200192
messageId: 'forbiddenElement',
@@ -225,9 +217,7 @@ ruleTester.run('forbid-elements', rule, {
225217
},
226218
{
227219
code: 'React.createElement("button", {}, child)',
228-
options: [
229-
{ forbid: ['button'] },
230-
],
220+
options: [{ forbid: ['button'] }],
231221
errors: [
232222
{
233223
messageId: 'forbiddenElement',
@@ -237,9 +227,7 @@ ruleTester.run('forbid-elements', rule, {
237227
},
238228
{
239229
code: '[React.createElement(Modal), React.createElement("button")]',
240-
options: [
241-
{ forbid: ['button', 'Modal'] },
242-
],
230+
options: [{ forbid: ['button', 'Modal'] }],
243231
errors: [
244232
{
245233
messageId: 'forbiddenElement',
@@ -269,9 +257,7 @@ ruleTester.run('forbid-elements', rule, {
269257
},
270258
{
271259
code: 'React.createElement(dotted.component)',
272-
options: [
273-
{ forbid: ['dotted.component'] },
274-
],
260+
options: [{ forbid: ['dotted.component'] }],
275261
errors: [
276262
{
277263
messageId: 'forbiddenElement',
@@ -281,9 +267,7 @@ ruleTester.run('forbid-elements', rule, {
281267
},
282268
{
283269
code: 'React.createElement(_comp)',
284-
options: [
285-
{ forbid: ['_comp'] },
286-
],
270+
options: [{ forbid: ['_comp'] }],
287271
errors: [
288272
{
289273
messageId: 'forbiddenElement',

tests/lib/rules/forbid-foreign-prop-types.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ ruleTester.run('forbid-foreign-prop-types', rule, {
6969
name: Message.propTypes.message
7070
};
7171
`,
72-
options: [
73-
{ allowInPropTypes: true },
74-
],
72+
options: [{ allowInPropTypes: true }],
7573
},
7674
{
7775
code: `
@@ -82,9 +80,7 @@ ruleTester.run('forbid-foreign-prop-types', rule, {
8280
}
8381
`,
8482
parser: parsers.BABEL_ESLINT,
85-
options: [
86-
{ allowInPropTypes: true },
87-
],
83+
options: [{ allowInPropTypes: true }],
8884
},
8985
],
9086

@@ -200,11 +196,7 @@ ruleTester.run('forbid-foreign-prop-types', rule, {
200196
name: Message.propTypes.message
201197
};
202198
`,
203-
options: [
204-
{
205-
allowInPropTypes: false,
206-
},
207-
],
199+
options: [{ allowInPropTypes: false }],
208200
errors: [
209201
{
210202
messageId: 'forbiddenPropType',
@@ -221,11 +213,7 @@ ruleTester.run('forbid-foreign-prop-types', rule, {
221213
}
222214
`,
223215
parser: parsers.BABEL_ESLINT,
224-
options: [
225-
{
226-
allowInPropTypes: false,
227-
},
228-
],
216+
options: [{ allowInPropTypes: false }],
229217
errors: [
230218
{
231219
messageId: 'forbiddenPropType',

0 commit comments

Comments
 (0)