forked from mysticatea/eslint-plugin-node
-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Create a shared settings document #115
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ffa1a05
docs: Create a shared settings document
scagood 678c62b
docs: add links to shared settings in no-missing-import
scagood 31ac6ca
docs: Reference shared settings for most shared settings
scagood 2f27eb8
docs: Disable "ruleDocSectionOptions" in "eslint-doc-generator"
scagood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmish it causes
eslint-docs-generator
to report an error, when moving the options docs to another page(shared-settings). Is there a way to ignore the error?I'm glad to help making a PR in
eslint-docs-generagor
if you want. 😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it looks like the rule options are all mentioned in a shared doc instead, it should be safe for you to use the option
--rule-doc-section-options false
to disable the check (https://github.com/bmish/eslint-doc-generator#configuration-options).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that we mention the root option, and reference it, eg in
no-extraneous-import
:We reference
convertPath
docs/rules/no-extraneous-import.md#convertpath and point to the shared setting docs/shared-settings.md#convertpathThe schema is defined here: lib/rules/no-extraneous-import.js#L27-L31
The issue is that the missing options are child properties of
convertPath
:convertPath.include
convertPath.exclude
convertPath.replace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing eslint-doc-generator option
--rule-doc-section-options
is all-or-nothing in terms of checking for the options section and any named options it can detect. So with your planned design, you may just have to disable the option. Let me know if you have ideas for more granular options to control these checks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonderful job! The option looks useful! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can turn off this option for now and use that option when it was supported in
eslint-doc-generator
.wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm, I don't love the option, as you'd need to be more vigilant in PRs.
If that is fine with you, then we can proceed with the option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love it, but its disabled here:
2f27eb8
(#115)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scagood
--rule-doc-section-options-depth
(as it customizes the existing--rule-doc-section-options
option behavior) sounds like an interesting idea. Would you like to open an issue in eslint-doc-generator to suggest it so we can track this? I'm open to considering it if you feel that it's necessary and ideally that it would be useful to more than just this plugin.In the meantime, you should proceed without this and just disable
--rule-doc-section-options
for now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid breaking changes:
--rule-doc-section-options=true
can be treated asdepth: Infinity
--rule-doc-section-options=false
asdepth: 0