Skip to content

Commit 26b1753

Browse files
authored
Add eslint-plugin-github and fix issues (#29201)
This plugin has a few useful rules. The only thing I dislike about it is that it pulls in a rather big number of dependencies for react-related rules we don't use, but it can't really be avoided. Rule docs: https://github.com/github/eslint-plugin-github?tab=readme-ov-file#rules
1 parent d8d4b33 commit 26b1753

File tree

9 files changed

+1028
-40
lines changed

9 files changed

+1028
-40
lines changed

.eslintrc.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ plugins:
1212
- "@eslint-community/eslint-plugin-eslint-comments"
1313
- "@stylistic/eslint-plugin-js"
1414
- eslint-plugin-array-func
15+
- eslint-plugin-github
1516
- eslint-plugin-i
1617
- eslint-plugin-jquery
1718
- eslint-plugin-no-jquery
@@ -209,6 +210,29 @@ rules:
209210
func-names: [0]
210211
func-style: [0]
211212
getter-return: [2]
213+
github/a11y-aria-label-is-well-formatted: [0]
214+
github/a11y-no-title-attribute: [0]
215+
github/a11y-no-visually-hidden-interactive-element: [0]
216+
github/a11y-role-supports-aria-props: [0]
217+
github/a11y-svg-has-accessible-name: [0]
218+
github/array-foreach: [0]
219+
github/async-currenttarget: [2]
220+
github/async-preventdefault: [2]
221+
github/authenticity-token: [0]
222+
github/get-attribute: [0]
223+
github/js-class-name: [0]
224+
github/no-blur: [0]
225+
github/no-d-none: [0]
226+
github/no-dataset: [2]
227+
github/no-dynamic-script-tag: [2]
228+
github/no-implicit-buggy-globals: [2]
229+
github/no-inner-html: [0]
230+
github/no-innerText: [2]
231+
github/no-then: [2]
232+
github/no-useless-passive: [2]
233+
github/prefer-observers: [2]
234+
github/require-passive-events: [2]
235+
github/unescaped-html-literal: [0]
212236
grouped-accessor-pairs: [2]
213237
guard-for-in: [0]
214238
id-blacklist: [0]

build/generate-images.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@ async function main() {
7979
]);
8080
}
8181

82-
main().then(exit).catch(exit);
82+
try {
83+
exit(await main());
84+
} catch (err) {
85+
exit(err);
86+
}

build/generate-svg.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ async function main() {
6363
]);
6464
}
6565

66-
main().then(exit).catch(exit);
66+
try {
67+
exit(await main());
68+
} catch (err) {
69+
exit(err);
70+
}

0 commit comments

Comments
 (0)