Skip to content

Commit 575e466

Browse files
authored
feat: use eslint-plugin-userscripts (#202)
1 parent c7dbdcd commit 575e466

Some content is hidden

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

48 files changed

+64
-0
lines changed

.eslintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44
"es2020": true,
55
"greasemonkey": true
66
},
7+
"overrides": [
8+
{
9+
"files": ["*.user.js"],
10+
"extends": ["plugin:userscripts/recommended"],
11+
"rules": {
12+
"userscripts/align-attributes": ["error", 1],
13+
"userscripts/compat-headers": "error"
14+
},
15+
"settings": {
16+
"userscriptVersions": {
17+
"tampermonkey": ">=4",
18+
"violentmonkey": ">=2",
19+
"greasemonkey": "*"
20+
}
21+
}
22+
}
23+
],
724
"parserOptions": {
825
"ecmaVersion": 11
926
},

gist-raw-links.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/gist-raw-links.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
/* global GM */
2324
(() => {
2425
"use strict";

gist-to-dabblet.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/gist-to-dabblet.user.js
1414
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1515
// ==/UserScript==
16+
1617
(() => {
1718
"use strict";
1819

github-code-colors.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-code-colors.user.js
1919
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2020
// ==/UserScript==
21+
2122
/* global Color */
2223
(() => {
2324
"use strict";

github-code-folding.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-code-folding.user.js
1919
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2020
// ==/UserScript==
21+
2122
/* global $ $$ on */
2223
/**
2324
* This userscript has been heavily modified from the "github-code-folding"

github-code-guides.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-code-guides.user.js
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717
// ==/UserScript==
18+
1819
/* copy into textarea to check the guides
1920
1 2 3 4 5 6 7 8
2021
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345

github-code-show-whitespace.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-code-show-whitespace.user.js
2424
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2525
// ==/UserScript==
26+
2627
/* global GM */
2728
(async () => {
2829
"use strict";

github-collapse-in-comment.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-collapse-in-comment.user.js
1919
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2020
// ==/UserScript==
21+
2122
(() => {
2223
"use strict";
2324
/*

github-collapse-markdown.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-collapse-markdown.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
(() => {
2324
"use strict";
2425

github-copy-code-snippet.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-copy-code-snippet.user.js
1515
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1616
// ==/UserScript==
17+
1718
(() => {
1819
"use strict";
1920

github-custom-hotkeys.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-custom-hotkeys.user.js
1919
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2020
// ==/UserScript==
21+
2122
/* global $ $$ on */
2223
(() => {
2324
"use strict";

github-custom-navigation.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-custom-navigation.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
/* global dragula $ $$ addClass removeClass on */
2324
(() => {
2425
"use strict";

github-diff-expander.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-diff-expander.user.js
1515
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1616
// ==/UserScript==
17+
1718
(() => {
1819
"use strict";
1920

github-diff-file-toggle.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717

1818
// ==/UserScript==
19+
1920
/* global $ $$ on debounce make */
2021
(() => {
2122
"use strict";

github-diff-filename.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-diff-filename.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
/* global $ $$ on */
2021
(() => {
2122
"use strict";

github-diff-files-filter.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// @icon https://github.githubassets.com/pinned-octocat.svg
1313
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1414
// ==/UserScript==
15+
1516
(() => {
1617
"use strict";
1718

github-diff-links.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-diff-links.user.js
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717
// ==/UserScript==
18+
1819
/* global $ $$ on */
1920
(() => {
2021
"use strict";

github-download-zip.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-download-zip.user.js
2121
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2222
// ==/UserScript==
23+
2324
/* global GM */
2425
(() => {
2526
"use strict";

github-files-filter.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-files-filter.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
(() => {
2021
"use strict";
2122

github-font-preview.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-font-preview.user.js
2121
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2222
// ==/UserScript==
23+
2324
/* global opentype */
2425
(() => {
2526
"use strict";

github-hide-own-feed-meta.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-hide-own-feed-meta.user.js
1515
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1616
// ==/UserScript==
17+
1718
(() => {
1819
"use strict";
1920

github-html-preview.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-html-preview.user.js
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717
// ==/UserScript==
18+
1819
/* global $ $$ on */
1920
(() => {
2021
"use strict";

github-image-preview.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-image-preview.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
(() => {
2324
"use strict";
2425

github-in-vscode.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-in-vscode.user.js
1818
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1919
// ==/UserScript==
20+
2021
/* global $ on make */
2122
(() => {
2223
"use strict";

github-indent-comments.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-indent-comments.user.js
2222
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2323
// ==/UserScript==
24+
2425
/* global $ $$ on make */
2526
(() => {
2627
"use strict";

github-issue-add-details.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-issue-add-details.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
/* global $ $$ on make */
2021
(() => {
2122
"use strict";

github-issue-comments.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-issue-comments.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
(() => {
2021
"use strict";
2122

github-issue-counts.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-issue-counts.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
(() => {
2021
"use strict";
2122

github-issue-highlighter.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-issue-highlighter.user.js
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717
// ==/UserScript==
18+
1819
(() => {
1920
"use strict";
2021

github-issue-show-status.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-issue-show-status.user.js
1515
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1616
// ==/UserScript==
17+
1718
(() => {
1819
"use strict";
1920

github-label-color-picker.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-label-color-picker.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
/* global jsColorPicker $ on */
2324
(() => {
2425
"use strict";

github-mentioned-links.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-mentioned-links.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
/* global $ $$ on */
2021
(() => {
2122
"use strict";

github-remove-diff-signs.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-remove-diff-signs.user.js
1414
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1515
// ==/UserScript==
16+
1617
(() => {
1718
"use strict";
1819

github-reveal-header.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-reveal-header.user.js
1515
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1616
// ==/UserScript==
17+
1718
(() => {
1819
"use strict";
1920

github-rtl-comments.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-rtl-comments.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
(() => {
2324
"use strict";
2425

github-search-autocomplete.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-search-autocomplete.user.js
1818
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1919
// ==/UserScript==
20+
2021
(($) => {
2122
"use strict";
2223

github-sort-content.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-sort-content.user.js
1919
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2020
// ==/UserScript==
21+
2122
/* global GM tinysort */
2223
(() => {
2324
"use strict";

github-sort-reactions.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-sort-reactions.user.js
1717
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1818
// ==/UserScript==
19+
1920
(() => {
2021
"use strict";
2122

github-static-time.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-static-time.user.js
2020
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2121
// ==/UserScript==
22+
2223
(() => {
2324
/* global moment $ $$ on */
2425
"use strict";

github-title-notification.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-title-notification.user.js
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717
// ==/UserScript==
18+
1819
(() => {
1920
"use strict";
2021

github-toc.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-toc.user.js
2525
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2626
// ==/UserScript==
27+
2728
/* global $ $$ on addClass removeClass */
2829
(async () => {
2930
"use strict";

github-toggle-diff-comments.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-toggle-diff-comments.user.js
1818
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1919
// ==/UserScript==
20+
2021
/* global GM $ $$ on debounce make */
2122
(() => {
2223
"use strict";

github-toggle-expanders.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// @icon https://github.githubassets.com/pinned-octocat.svg
1212
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1313
// ==/UserScript==
14+
1415
(() => {
1516
/* global $ $$ on */
1617
"use strict";

github-toggle-wiki-sidebar.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-toggle-wiki-sidebar.user.js
1818
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1919
// ==/UserScript==
20+
2021
/* global $ make on */
2122
(() => {
2223
"use strict";

github-unknown-license.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-unknown-license.user.js
1616
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1717
// ==/UserScript==
18+
1819
/* global $ on */
1920
(() => {
2021
"use strict";

github-update-fork.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// @downloadURL https://rg.gosu.cc/Mottie/GitHub-userscripts/master/github-update-fork.user.js
1414
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
1515
// ==/UserScript==
16+
1617
(() => {
1718
"use strict";
1819

github-watcher.user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// @downloadURL https://rg.gosu.cc/Mottie/Github-userscripts/master/github-watcher.user.js
1919
// @supportURL https://github.com/Mottie/GitHub-userscripts/issues
2020
// ==/UserScript==
21+
2122
/* global $ $$ on make */
2223
(() => {
2324
"use strict";

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"eslint": "^8.21.0",
14+
"eslint-plugin-userscripts": "^0.4.0",
1415
"github-reserved-names": "^2.0.4",
1516
"ver": "^6.0.2"
1617
},

0 commit comments

Comments
 (0)