Skip to content

Commit 81cf0e3

Browse files
hardfistCopilot
andauthored
feat: implement GitHub Action to auto-generate and update rule-manifest.json (#257)
Co-authored-by: Copilot <[email protected]>
1 parent bd9f639 commit 81cf0e3

File tree

4 files changed

+603
-0
lines changed

4 files changed

+603
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Update Rule Manifest
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update-rule-manifest:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Check for rule changes
23+
id: diff
24+
run: |
25+
git fetch origin main
26+
git diff --name-only HEAD~10 HEAD | grep '^internal/rules/' || echo '' > changed_rules.txt
27+
git diff --name-status HEAD~10 HEAD | grep '^internal/rules/' || echo '' > changed_rules_status.txt
28+
29+
- name: Generate rule-manifest.json if rules changed
30+
if: ${{ hashFiles('changed_rules.txt') != '' }}
31+
run: |
32+
node scripts/gen-rule-manifest.js
33+
34+
- name: Create Pull Request if rule-manifest.json changed
35+
uses: peter-evans/create-pull-request@v5
36+
with:
37+
commit-message: 'chore: update rule-manifest.json [auto]'
38+
title: 'chore: update rule-manifest.json [auto]'
39+
body: 'Auto-generated PR to update rule-manifest.json when rules change.'
40+
branch: auto/update-rule-manifest
41+
add-paths: packages/rslint-test-tools/rule-manifest.json
42+
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Lines changed: 319 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,319 @@
1+
{
2+
"rules": [
3+
{
4+
"name": "adjacent_overload_signatures",
5+
"group": "typescript-eslint",
6+
"status": "full",
7+
"failing_case": []
8+
},
9+
{
10+
"name": "array_type",
11+
"group": "typescript-eslint",
12+
"status": "partial-impl",
13+
"failing_case": [
14+
{
15+
"name": "array-type (nested)",
16+
"url": "packages/rslint-test-tools/tests/typescript-eslint/rules/array-type.test.ts#L1998"
17+
},
18+
{
19+
"name": "schema validation",
20+
"url": "packages/rslint-test-tools/tests/typescript-eslint/rules/array-type.test.ts#L2234"
21+
}
22+
]
23+
},
24+
{
25+
"name": "await_thenable",
26+
"group": "typescript-eslint",
27+
"status": "full",
28+
"failing_case": []
29+
},
30+
{
31+
"name": "class_literal_property_style",
32+
"group": "typescript-eslint",
33+
"status": "full",
34+
"failing_case": []
35+
},
36+
{
37+
"name": "no_array_delete",
38+
"group": "typescript-eslint",
39+
"status": "full",
40+
"failing_case": []
41+
},
42+
{
43+
"name": "no_base_to_string",
44+
"group": "typescript-eslint",
45+
"status": "partial-test",
46+
"failing_case": []
47+
},
48+
{
49+
"name": "no_confusing_void_expression",
50+
"group": "typescript-eslint",
51+
"status": "full",
52+
"failing_case": []
53+
},
54+
{
55+
"name": "no_duplicate_type_constituents",
56+
"group": "typescript-eslint",
57+
"status": "full",
58+
"failing_case": []
59+
},
60+
{
61+
"name": "no_empty_function",
62+
"group": "typescript-eslint",
63+
"status": "full",
64+
"failing_case": []
65+
},
66+
{
67+
"name": "no_empty_interface",
68+
"group": "typescript-eslint",
69+
"status": "full",
70+
"failing_case": []
71+
},
72+
{
73+
"name": "no_floating_promises",
74+
"group": "typescript-eslint",
75+
"status": "partial-test",
76+
"failing_case": []
77+
},
78+
{
79+
"name": "no_for_in_array",
80+
"group": "typescript-eslint",
81+
"status": "partial-test",
82+
"failing_case": []
83+
},
84+
{
85+
"name": "no_implied_eval",
86+
"group": "typescript-eslint",
87+
"status": "full",
88+
"failing_case": []
89+
},
90+
{
91+
"name": "no_meaningless_void_operator",
92+
"group": "typescript-eslint",
93+
"status": "partial-test",
94+
"failing_case": []
95+
},
96+
{
97+
"name": "no_misused_promises",
98+
"group": "typescript-eslint",
99+
"status": "partial-test",
100+
"failing_case": []
101+
},
102+
{
103+
"name": "no_misused_spread",
104+
"group": "typescript-eslint",
105+
"status": "partial-test",
106+
"failing_case": []
107+
},
108+
{
109+
"name": "no_mixed_enums",
110+
"group": "typescript-eslint",
111+
"status": "partial-test",
112+
"failing_case": []
113+
},
114+
{
115+
"name": "no_namespace",
116+
"group": "typescript-eslint",
117+
"status": "full",
118+
"failing_case": []
119+
},
120+
{
121+
"name": "no_redundant_type_constituents",
122+
"group": "typescript-eslint",
123+
"status": "partial-test",
124+
"failing_case": []
125+
},
126+
{
127+
"name": "no_require_imports",
128+
"group": "typescript-eslint",
129+
"status": "full",
130+
"failing_case": []
131+
},
132+
{
133+
"name": "no_unnecessary_boolean_literal_compare",
134+
"group": "typescript-eslint",
135+
"status": "partial-test",
136+
"failing_case": []
137+
},
138+
{
139+
"name": "no_unnecessary_template_expression",
140+
"group": "typescript-eslint",
141+
"status": "partial-test",
142+
"failing_case": []
143+
},
144+
{
145+
"name": "no_unnecessary_type_arguments",
146+
"group": "typescript-eslint",
147+
"status": "partial-test",
148+
"failing_case": []
149+
},
150+
{
151+
"name": "no_unnecessary_type_assertion",
152+
"group": "typescript-eslint",
153+
"status": "partial-test",
154+
"failing_case": []
155+
},
156+
{
157+
"name": "no_unsafe_argument",
158+
"group": "typescript-eslint",
159+
"status": "partial-test",
160+
"failing_case": []
161+
},
162+
{
163+
"name": "no_unsafe_assignment",
164+
"group": "typescript-eslint",
165+
"status": "partial-test",
166+
"failing_case": []
167+
},
168+
{
169+
"name": "no_unsafe_call",
170+
"group": "typescript-eslint",
171+
"status": "partial-test",
172+
"failing_case": []
173+
},
174+
{
175+
"name": "no_unsafe_enum_comparison",
176+
"group": "typescript-eslint",
177+
"status": "partial-test",
178+
"failing_case": []
179+
},
180+
{
181+
"name": "no_unsafe_member_access",
182+
"group": "typescript-eslint",
183+
"status": "partial-test",
184+
"failing_case": []
185+
},
186+
{
187+
"name": "no_unsafe_return",
188+
"group": "typescript-eslint",
189+
"status": "partial-test",
190+
"failing_case": []
191+
},
192+
{
193+
"name": "no_unsafe_type_assertion",
194+
"group": "typescript-eslint",
195+
"status": "partial-test",
196+
"failing_case": []
197+
},
198+
{
199+
"name": "no_unsafe_unary_minus",
200+
"group": "typescript-eslint",
201+
"status": "partial-test",
202+
"failing_case": []
203+
},
204+
{
205+
"name": "no_unused_vars",
206+
"group": "typescript-eslint",
207+
"status": "partial-test",
208+
"failing_case": []
209+
},
210+
{
211+
"name": "no_useless_empty_export",
212+
"group": "typescript-eslint",
213+
"status": "partial-test",
214+
"failing_case": []
215+
},
216+
{
217+
"name": "no_var_requires",
218+
"group": "typescript-eslint",
219+
"status": "partial-test",
220+
"failing_case": []
221+
},
222+
{
223+
"name": "non_nullable_type_assertion_style",
224+
"group": "typescript-eslint",
225+
"status": "partial-test",
226+
"failing_case": []
227+
},
228+
{
229+
"name": "only_throw_error",
230+
"group": "typescript-eslint",
231+
"status": "partial-test",
232+
"failing_case": []
233+
},
234+
{
235+
"name": "prefer_as_const",
236+
"group": "typescript-eslint",
237+
"status": "partial-test",
238+
"failing_case": []
239+
},
240+
{
241+
"name": "prefer_promise_reject_errors",
242+
"group": "typescript-eslint",
243+
"status": "partial-test",
244+
"failing_case": []
245+
},
246+
{
247+
"name": "prefer_reduce_type_parameter",
248+
"group": "typescript-eslint",
249+
"status": "partial-test",
250+
"failing_case": []
251+
},
252+
{
253+
"name": "prefer_return_this_type",
254+
"group": "typescript-eslint",
255+
"status": "partial-test",
256+
"failing_case": []
257+
},
258+
{
259+
"name": "promise_function_async",
260+
"group": "typescript-eslint",
261+
"status": "partial-test",
262+
"failing_case": []
263+
},
264+
{
265+
"name": "related_getter_setter_pairs",
266+
"group": "typescript-eslint",
267+
"status": "partial-test",
268+
"failing_case": []
269+
},
270+
{
271+
"name": "require_array_sort_compare",
272+
"group": "typescript-eslint",
273+
"status": "partial-test",
274+
"failing_case": []
275+
},
276+
{
277+
"name": "require_await",
278+
"group": "typescript-eslint",
279+
"status": "partial-test",
280+
"failing_case": []
281+
},
282+
{
283+
"name": "restrict_plus_operands",
284+
"group": "typescript-eslint",
285+
"status": "partial-test",
286+
"failing_case": []
287+
},
288+
{
289+
"name": "restrict_template_expressions",
290+
"group": "typescript-eslint",
291+
"status": "partial-test",
292+
"failing_case": []
293+
},
294+
{
295+
"name": "return_await",
296+
"group": "typescript-eslint",
297+
"status": "partial-test",
298+
"failing_case": []
299+
},
300+
{
301+
"name": "switch_exhaustiveness_check",
302+
"group": "typescript-eslint",
303+
"status": "partial-test",
304+
"failing_case": []
305+
},
306+
{
307+
"name": "unbound_method",
308+
"group": "typescript-eslint",
309+
"status": "partial-test",
310+
"failing_case": []
311+
},
312+
{
313+
"name": "use_unknown_in_catch_callback_variable",
314+
"group": "typescript-eslint",
315+
"status": "partial-test",
316+
"failing_case": []
317+
}
318+
]
319+
}

0 commit comments

Comments
 (0)