调整 eslint-plugin-userscripts 规则#1510
Open
cyfung1031 wants to merge 2 commits into
Open
Conversation
Collaborator
Author
AI SuggestionsMy recommendation for ScriptCat default: // ScriptCat-friendly overrides
"userscripts/align-attributes": ["warn", 2],
"userscripts/use-homepage-and-url": ["off"],
"userscripts/require-download-url": ["off"],
// Recommended additional defaults:
"userscripts/filename-user": ["off"],
"userscripts/better-use-match": ["off"],
"userscripts/require-description": ["off"],
"userscripts/metadata-spacing": ["warn"],
"userscripts/require-attribute-space-prefix": ["warn"],
// Keep strict:
"userscripts/no-invalid-grant": ["error"],
"userscripts/no-invalid-headers": ["error"],
"userscripts/no-invalid-metadata": ["error"],
"userscripts/require-name": ["error"],
"userscripts/require-version": ["error"],
// Keep off unless ScriptCat provides target-runner settings:
"userscripts/compat-grant": ["off"],
"userscripts/compat-headers": ["off"],The most important change from your current config is: turn I would disable these by default:
I would not disable these:
For style-only rules, I’d downgrade rather than disable: "userscripts/align-attributes": ["warn", 2],
"userscripts/metadata-spacing": ["warn"],
"userscripts/require-attribute-space-prefix": ["warn"],Final suggested block: // -- ScriptCat overrides --
"userscripts/align-attributes": ["warn", 2],
"userscripts/filename-user": ["off"],
"userscripts/use-homepage-and-url": ["off"],
"userscripts/require-download-url": ["off"],
"userscripts/better-use-match": ["off"],
"userscripts/require-description": ["off"],
"userscripts/metadata-spacing": ["warn"],
"userscripts/require-attribute-space-prefix": ["warn"],
"userscripts/no-invalid-grant": ["error"],
"userscripts/no-invalid-headers": ["error"],
"userscripts/no-invalid-metadata": ["error"],
"userscripts/require-name": ["error"],
"userscripts/require-version": ["error"],
"userscripts/compat-grant": ["off"],
"userscripts/compat-headers": ["off"],This gives ScriptCat a good default balance: catch metadata/runtime mistakes, avoid forcing publishing conventions on normal users. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist / 检查清单
Description / 描述
https://yash-singh1.github.io/eslint-plugin-userscripts/#/rules/use-homepage-and-url
这里指的应该是 greasemonkey 只支持
@homepageURL不支持@homepage?我在网上也查不到什么相关资料
我理解是某些网站不支持
@homepage例如 OpenUserJs.orghttps://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/#homepageurl
但TM早已定明
@homepage,@homepageURL,@website,@source没有分别https://www.tampermonkey.net/documentation.php?locale=en&q=homepage
所以 ScriptCat 根本不需要理会这个
Screenshots / 截图