feat: add meta.defaultOptions
Prerequisites checklist
- [x] I have read the contributing guidelines.
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update [ ] Bug fix (template) [ ] New rule (template) [ ] Changes an existing rule (template) [ ] Add autofix to a rule [ ] Add a CLI option [x] Add something to the core [ ] Other, please explain:
What changes did you make? (Give an overview)
Augments linting to factor in a new optional meta.defaultOptions. If a rule describes default options this way, any user-provided options are merged on top of the default options.
These defaults are applied by a new deepMergeArrays utility in:
ConfigValidatorLinterin two places:- For configs: by augmenting the existing
getRuleOptionshelper - For inline comments in flat config: with a new
getRuleOptionsInlinehelper- Inline comments in legacy configs go through
RuleValidatorinstead
- Inline comments in legacy configs go through
- For configs: by augmenting the existing
RuleValidator
Is there anything you'd like reviewers to focus on?
- Issue: https://github.com/eslint/eslint/issues/17448
- RFC: https://github.com/eslint/rfcs/pull/113
Co-authored-by: Milos Djermanovic [email protected]
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Deploy Preview for docs-eslint canceled.
| Name | Link |
|---|---|
| Latest commit | c555a0549a6c6d395eaeccdc7aef9b6017d81594 |
| Latest deploy log | https://app.netlify.com/sites/docs-eslint/deploys/66bc05c46a48860008229a38 |
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
Not stale. @JoshuaKGoldberg there's a review comment for you to look into. Thanks.
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
This pull request was auto-closed due to inactivity. While we wish we could keep working on every request, we unfortunately don't have the bandwidth to continue here and need to focus on other things. You can resubmit this pull request if you would like to continue working on it.
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
In view of the current situation that the related RFC is about to be merged, I think this PR will also be active, so it should not be regarded as stable and closed.
Hi @JoshuaKGoldberg!, thanks for the Pull Request
The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
- The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
- There should be a space following the initial tag and colon, for example 'feat: Message'.
- The first letter of the tag should be in lowercase
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.
Read more about contributing to ESLint here
@JoshuaKGoldberg can you please rebase and address the conflicts?
The browser tests aren't failing for me locally. Test flake?
Yes, the browser tests can be a little bit flaky, but they look okay right now.
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
@JoshuaKGoldberg there are a few conflicts for you to look at and a review comment too
Waiting for @mdjermanovic's review before merging
Maybe we could simplify function deepMergeObjects like this:
function deepMergeObjects(first, second) {
if (second === void 0) {
return first;
}
if (!isObjectNotArray(first) || !isObjectNotArray(second)) {
return second;
}
const result = {
...first,
...second
};
for (const key of Object.keys(second)) {
if (Object.prototype.propertyIsEnumerable.call(first, key)) {
result[key] = deepMergeObjects(first[key], second[key]);
}
}
return result;
}
Wow! Really nice refactor, thanks! 👏
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
Ah, timing - I'm going through the code now. Will respond soon.
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.
Waiting for @mdjermanovic to review here.
@JoshuaKGoldberg there's a conflict to resolve.