rubocop-view_component 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CLAUDE.md +72 -0
- data/README.md +71 -23
- data/config/default.yml +17 -0
- data/lib/rubocop/cop/view_component/prefer_composition.rb +44 -0
- data/lib/rubocop/cop/view_component/prefer_private_methods.rb +2 -2
- data/lib/rubocop/cop/view_component/prefer_slots.rb +3 -23
- data/lib/rubocop/cop/view_component/test_rendered_output.rb +72 -0
- data/lib/rubocop/cop/view_component_cops.rb +2 -0
- data/lib/rubocop/view_component/version.rb +1 -1
- data/script/verify +178 -0
- data/spec/expected_govuk_failures.json +200 -0
- data/spec/expected_polaris_failures.json +356 -0
- data/spec/expected_primer_failures.json +47 -35
- data/spec/rubocop/cop/view_component/prefer_composition_spec.rb +83 -0
- data/spec/rubocop/cop/view_component/prefer_private_methods_spec.rb +8 -8
- data/spec/rubocop/cop/view_component/prefer_slots_spec.rb +24 -38
- data/spec/rubocop/cop/view_component/test_rendered_output_spec.rb +134 -0
- data/verification/govuk_rubocop_config.yml +3 -0
- data/verification/libraries.yml +11 -0
- data/verification/polaris_rubocop_config.yml +4 -0
- data/verification/primer_rubocop_config.yml +19 -0
- metadata +13 -5
- data/IMPLEMENTATION_PLAN.md +0 -177
- data/IMPLEMENTATION_SUMMARY.md +0 -172
- data/PLAN.md +0 -625
- data/script/verify_against_primer.rb +0 -128
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"path": "app/components/govuk_component/base.rb",
|
|
4
|
+
"line": 1,
|
|
5
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
6
|
+
"message": "ViewComponent class names should end with `Component`. (https://viewcomponent.org/best_practices.html)"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"path": "app/components/govuk_component/base.rb",
|
|
10
|
+
"line": 29,
|
|
11
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
12
|
+
"message": "Consider making `brand` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"path": "app/components/govuk_component/base.rb",
|
|
16
|
+
"line": 35,
|
|
17
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
18
|
+
"message": "Consider making `class_prefix` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "app/components/govuk_component/header_component.rb",
|
|
22
|
+
"line": 46,
|
|
23
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
24
|
+
"message": "ViewComponent class names should end with `Component`. (https://viewcomponent.org/best_practices.html)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "app/components/govuk_component/notification_banner_component.rb",
|
|
28
|
+
"line": 33,
|
|
29
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
30
|
+
"message": "ViewComponent class names should end with `Component`. (https://viewcomponent.org/best_practices.html)"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "app/components/govuk_component/notification_banner_component.rb",
|
|
34
|
+
"line": 55,
|
|
35
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
36
|
+
"message": "Consider making `link` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "app/components/govuk_component/notification_banner_component.rb",
|
|
40
|
+
"line": 59,
|
|
41
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
42
|
+
"message": "Consider making `default_attributes` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "app/components/govuk_component/pagination_component/adjacent_page.rb",
|
|
46
|
+
"line": 1,
|
|
47
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
48
|
+
"message": "ViewComponent class names should end with `Component`. (https://viewcomponent.org/best_practices.html)"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "app/components/govuk_component/pagination_component/item.rb",
|
|
52
|
+
"line": 1,
|
|
53
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
54
|
+
"message": "ViewComponent class names should end with `Component`. (https://viewcomponent.org/best_practices.html)"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "app/components/govuk_component/service_navigation_component.rb",
|
|
58
|
+
"line": 54,
|
|
59
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
60
|
+
"message": "Consider making `navigation` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "app/components/govuk_component/service_navigation_component.rb",
|
|
64
|
+
"line": 62,
|
|
65
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
66
|
+
"message": "Consider making `navigation_list` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "app/components/govuk_component/tab_component.rb",
|
|
70
|
+
"line": 21,
|
|
71
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
72
|
+
"message": "ViewComponent class names should end with `Component`. (https://viewcomponent.org/best_practices.html)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "app/components/govuk_component/tab_component.rb",
|
|
76
|
+
"line": 32,
|
|
77
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
78
|
+
"message": "Consider making `hidden_class` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "app/components/govuk_component/tab_component.rb",
|
|
82
|
+
"line": 38,
|
|
83
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
84
|
+
"message": "Consider making `li_classes` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "app/components/govuk_component/tab_component.rb",
|
|
88
|
+
"line": 42,
|
|
89
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
90
|
+
"message": "Consider making `li_link` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "app/components/govuk_component/tab_component.rb",
|
|
94
|
+
"line": 46,
|
|
95
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
96
|
+
"message": "Consider making `default_attributes` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "app/components/govuk_component/tab_component.rb",
|
|
100
|
+
"line": 50,
|
|
101
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
102
|
+
"message": "Consider making `combined_attributes` private. Only ViewComponent interface methods should be public. (https://viewcomponent.org/best_practices.html)"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"path": "spec/components/govuk_component/accordion_component_spec.rb",
|
|
106
|
+
"line": 84,
|
|
107
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
108
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"path": "spec/components/govuk_component/breadcrumbs_component_spec.rb",
|
|
112
|
+
"line": 44,
|
|
113
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
114
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "spec/components/govuk_component/configuration/footer_component_configuration_spec.rb",
|
|
118
|
+
"line": 42,
|
|
119
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
120
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
124
|
+
"line": 123,
|
|
125
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
126
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
130
|
+
"line": 182,
|
|
131
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
132
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
136
|
+
"line": 235,
|
|
137
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
138
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
142
|
+
"line": 254,
|
|
143
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
144
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
148
|
+
"line": 274,
|
|
149
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
150
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
154
|
+
"line": 294,
|
|
155
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
156
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
160
|
+
"line": 312,
|
|
161
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
162
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"path": "spec/components/govuk_component/footer_component_spec.rb",
|
|
166
|
+
"line": 336,
|
|
167
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
168
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"path": "spec/components/govuk_component/notification_banner_component_spec.rb",
|
|
172
|
+
"line": 59,
|
|
173
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
174
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"path": "spec/components/govuk_component/pagination_component_spec.rb",
|
|
178
|
+
"line": 317,
|
|
179
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
180
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"path": "spec/components/govuk_component/task_list_component_spec.rb",
|
|
184
|
+
"line": 139,
|
|
185
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
186
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"path": "spec/components/govuk_component/warning_text_component_spec.rb",
|
|
190
|
+
"line": 11,
|
|
191
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
192
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"path": "spec/components/govuk_component/warning_text_component_spec.rb",
|
|
196
|
+
"line": 41,
|
|
197
|
+
"cop": "ViewComponent/TestRenderedOutput",
|
|
198
|
+
"message": "Test instantiates a component but doesn't use `render_inline` or `render_preview`. Test the rendered output instead of component methods directly. (https://viewcomponent.org/guide/testing.html)"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"path": "app/components/polaris/action_list/section_component.rb",
|
|
4
|
+
"line": 16,
|
|
5
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
6
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"path": "app/components/polaris/avatar_component.rb",
|
|
10
|
+
"line": 43,
|
|
11
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
12
|
+
"message": "Consider making `style_class` private. Only ViewComponent interface methods should be public."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"path": "app/components/polaris/avatar_component.rb",
|
|
16
|
+
"line": 69,
|
|
17
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
18
|
+
"message": "Consider making `xor_hash` private. Only ViewComponent interface methods should be public."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "app/components/polaris/banner_component.rb",
|
|
22
|
+
"line": 77,
|
|
23
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
24
|
+
"message": "Consider making `default_icon` private. Only ViewComponent interface methods should be public."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "app/components/polaris/base_button.rb",
|
|
28
|
+
"line": 4,
|
|
29
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
30
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "app/components/polaris/base_checkbox.rb",
|
|
34
|
+
"line": 2,
|
|
35
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
36
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "app/components/polaris/base_checkbox.rb",
|
|
40
|
+
"line": 24,
|
|
41
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
42
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "app/components/polaris/base_checkbox.rb",
|
|
46
|
+
"line": 40,
|
|
47
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
48
|
+
"message": "Consider making `indeterminate?` private. Only ViewComponent interface methods should be public."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "app/components/polaris/base_radio_button.rb",
|
|
52
|
+
"line": 2,
|
|
53
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
54
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "app/components/polaris/base_radio_button.rb",
|
|
58
|
+
"line": 21,
|
|
59
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
60
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "app/components/polaris/button_group_component.rb",
|
|
64
|
+
"line": 60,
|
|
65
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
66
|
+
"message": "Consider making `all_items` private. Only ViewComponent interface methods should be public."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "app/components/polaris/checkbox_component.rb",
|
|
70
|
+
"line": 62,
|
|
71
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
72
|
+
"message": "Consider making `indeterminate?` private. Only ViewComponent interface methods should be public."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "app/components/polaris/choice_list_component.rb",
|
|
76
|
+
"line": 58,
|
|
77
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
78
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "app/components/polaris/choice_list_component.rb",
|
|
82
|
+
"line": 62,
|
|
83
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
84
|
+
"message": "Consider making `multiple_choice_allowed?` private. Only ViewComponent interface methods should be public."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "app/components/polaris/collapsible_component.rb",
|
|
88
|
+
"line": 15,
|
|
89
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
90
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "app/components/polaris/description_list_component.rb",
|
|
94
|
+
"line": 24,
|
|
95
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
96
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "app/components/polaris/dropzone_component.rb",
|
|
100
|
+
"line": 142,
|
|
101
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
102
|
+
"message": "Consider making `drop_actions` private. Only ViewComponent interface methods should be public."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"path": "app/components/polaris/exception_list_component.rb",
|
|
106
|
+
"line": 16,
|
|
107
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
108
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"path": "app/components/polaris/filters_component.rb",
|
|
112
|
+
"line": 74,
|
|
113
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
114
|
+
"message": "Consider making `popover_arguments` private. Only ViewComponent interface methods should be public."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "app/components/polaris/form_layout_component.rb",
|
|
118
|
+
"line": 29,
|
|
119
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
120
|
+
"message": "Consider making `all_items` private. Only ViewComponent interface methods should be public."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"path": "app/components/polaris/headless_button.rb",
|
|
124
|
+
"line": 4,
|
|
125
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
126
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"path": "app/components/polaris/headless_button.rb",
|
|
130
|
+
"line": 96,
|
|
131
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
132
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"path": "app/components/polaris/headless_button.rb",
|
|
136
|
+
"line": 104,
|
|
137
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
138
|
+
"message": "Consider making `html_options` private. Only ViewComponent interface methods should be public."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"path": "app/components/polaris/index_table/cell_component.rb",
|
|
142
|
+
"line": 7,
|
|
143
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
144
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"path": "app/components/polaris/inline_error_component.rb",
|
|
148
|
+
"line": 14,
|
|
149
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
150
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"path": "app/components/polaris/keyboard_key_component.rb",
|
|
154
|
+
"line": 9,
|
|
155
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
156
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"path": "app/components/polaris/label_component.rb",
|
|
160
|
+
"line": 32,
|
|
161
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
162
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"path": "app/components/polaris/layout/annotated_section.rb",
|
|
166
|
+
"line": 5,
|
|
167
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
168
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"path": "app/components/polaris/layout/section.rb",
|
|
172
|
+
"line": 5,
|
|
173
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
174
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"path": "app/components/polaris/layout_component.rb",
|
|
178
|
+
"line": 38,
|
|
179
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
180
|
+
"message": "Consider making `all_sections` private. Only ViewComponent interface methods should be public."
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"path": "app/components/polaris/modal/section_component.rb",
|
|
184
|
+
"line": 6,
|
|
185
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
186
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"path": "app/components/polaris/navigation/item_component.rb",
|
|
190
|
+
"line": 54,
|
|
191
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
192
|
+
"message": "Consider making `item_inner_wrapper_classes` private. Only ViewComponent interface methods should be public."
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"path": "app/components/polaris/navigation/item_component.rb",
|
|
196
|
+
"line": 62,
|
|
197
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
198
|
+
"message": "Consider making `link_classes` private. Only ViewComponent interface methods should be public."
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"path": "app/components/polaris/navigation/item_component.rb",
|
|
202
|
+
"line": 71,
|
|
203
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
204
|
+
"message": "Consider making `selected_sub_items?` private. Only ViewComponent interface methods should be public."
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"path": "app/components/polaris/navigation_component.rb",
|
|
208
|
+
"line": 11,
|
|
209
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
210
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"path": "app/components/polaris/navigation_list_component.rb",
|
|
214
|
+
"line": 9,
|
|
215
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
216
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"path": "app/components/polaris/new_tabs_component.rb",
|
|
220
|
+
"line": 33,
|
|
221
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
222
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"path": "app/components/polaris/option_list/checkbox_component.rb",
|
|
226
|
+
"line": 25,
|
|
227
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
228
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"path": "app/components/polaris/option_list/option_component.rb",
|
|
232
|
+
"line": 6,
|
|
233
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
234
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"path": "app/components/polaris/option_list/radio_button_component.rb",
|
|
238
|
+
"line": 32,
|
|
239
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
240
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"path": "app/components/polaris/option_list/section_component.rb",
|
|
244
|
+
"line": 42,
|
|
245
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
246
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"path": "app/components/polaris/page_component.rb",
|
|
250
|
+
"line": 57,
|
|
251
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
252
|
+
"message": "Consider making `title_length` private. Only ViewComponent interface methods should be public."
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"path": "app/components/polaris/popover/section_component.rb",
|
|
256
|
+
"line": 6,
|
|
257
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
258
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"path": "app/components/polaris/popover_component.rb",
|
|
262
|
+
"line": 112,
|
|
263
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
264
|
+
"message": "Consider making `popover_placement` private. Only ViewComponent interface methods should be public."
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"path": "app/components/polaris/resource_item/shortcut_actions_component.rb",
|
|
268
|
+
"line": 82,
|
|
269
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
270
|
+
"message": "Consider making `action_list_item_arguments` private. Only ViewComponent interface methods should be public."
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"path": "app/components/polaris/resource_list_component.rb",
|
|
274
|
+
"line": 37,
|
|
275
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
276
|
+
"message": "Consider making `resource_string` private. Only ViewComponent interface methods should be public."
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"path": "app/components/polaris/resource_list_component.rb",
|
|
280
|
+
"line": 43,
|
|
281
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
282
|
+
"message": "Consider making `count` private. Only ViewComponent interface methods should be public."
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"path": "app/components/polaris/select_component.rb",
|
|
286
|
+
"line": 88,
|
|
287
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
288
|
+
"message": "Consider making `hides_label?` private. Only ViewComponent interface methods should be public."
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"path": "app/components/polaris/shopify_navigation_component.rb",
|
|
292
|
+
"line": 40,
|
|
293
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
294
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"path": "app/components/polaris/shopify_navigation_component.rb",
|
|
298
|
+
"line": 56,
|
|
299
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
300
|
+
"message": "Consider making `detect_active` private. Only ViewComponent interface methods should be public."
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"path": "app/components/polaris/shopify_navigation_component.rb",
|
|
304
|
+
"line": 59,
|
|
305
|
+
"cop": "ViewComponent/NoGlobalState",
|
|
306
|
+
"message": "Avoid accessing `request` directly in ViewComponents. Pass necessary data through the constructor instead."
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"path": "app/components/polaris/skeleton_display_text_component.rb",
|
|
310
|
+
"line": 17,
|
|
311
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
312
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"path": "app/components/polaris/skeleton_thumbnail_component.rb",
|
|
316
|
+
"line": 16,
|
|
317
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
318
|
+
"message": "Consider making `system_arguments` private. Only ViewComponent interface methods should be public."
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"path": "app/components/polaris/tabs_component.rb",
|
|
322
|
+
"line": 33,
|
|
323
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
324
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"path": "app/components/polaris/text_component.rb",
|
|
328
|
+
"line": 114,
|
|
329
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
330
|
+
"message": "Consider making `alignment_class` private. Only ViewComponent interface methods should be public."
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"path": "app/components/polaris/text_component.rb",
|
|
334
|
+
"line": 120,
|
|
335
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
336
|
+
"message": "Consider making `color_class` private. Only ViewComponent interface methods should be public."
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"path": "app/components/polaris/text_component.rb",
|
|
340
|
+
"line": 126,
|
|
341
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
342
|
+
"message": "Consider making `font_weight_class` private. Only ViewComponent interface methods should be public."
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"path": "app/components/polaris/text_field_component.rb",
|
|
346
|
+
"line": 195,
|
|
347
|
+
"cop": "ViewComponent/ComponentSuffix",
|
|
348
|
+
"message": "ViewComponent class names should end with `Component`."
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"path": "app/components/polaris/thumbnail_component.rb",
|
|
352
|
+
"line": 39,
|
|
353
|
+
"cop": "ViewComponent/PreferPrivateMethods",
|
|
354
|
+
"message": "Consider making `renders?` private. Only ViewComponent interface methods should be public."
|
|
355
|
+
}
|
|
356
|
+
]
|