Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

The no-restricted-attr-values documentation contained an example that incorrectly referenced @html-eslint/no-restricted-attrs, causing users to encounter schema validation errors when using attrValuePatterns.

Changes

  • Fixed rule name in example code block from no-restricted-attrs to no-restricted-attr-values

The example now correctly demonstrates the no-restricted-attr-values rule with its valid options (attrPatterns, attrValuePatterns, message) instead of referencing the no-restricted-attrs rule which only accepts (tagPatterns, attrPatterns, message).

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Unexpected property "attrValuePatterns"</issue_title>
<issue_description>Describe the bug

Error: Key "rules": Key "html/no-restricted-attrs":
        Value {"attrPatterns":["rel"],"attrValuePatterns":["noreferrer"],"message":"noreferrer is useless."} should NOT have additional properties.
                Unexpected property "attrValuePatterns". Expected properties: "tagPatterns", "attrPatterns", "message".

To Reproduce

"html/no-restricted-attrs": [
		"error",
		{
			attrPatterns: ["rel"],
			attrValuePatterns: ["noreferrer"],
			message: "noreferrer is useless.",
		}
	],

Expected behavior
works as its in doc

Additional context
no.
</issue_description>

Comments on the Issue (you are @copilot in this section)

@yeonjuan Hi @steve02081504 The “no-restricted-attrs” rule does not have that option. Would you like to try using [no-restricted-attrs-values](https://html-eslint.org/docs/rules/no-restricted-attr-values)? @yeonjuan Oh, that's right. There was a typo in the document. `no-restricted-attrs` -> `no-restricted-attr-values` This needs to be corrected. Thank you.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 1, 2025
Co-authored-by: yeonjuan <41323220+yeonjuan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unexpected property 'attrValuePatterns' in rule configuration Fix rule name typo in no-restricted-attr-values documentation Nov 1, 2025
Copilot AI requested a review from yeonjuan November 1, 2025 15:12
Copilot finished work on behalf of yeonjuan November 1, 2025 15:12
@yeonjuan yeonjuan marked this pull request as ready for review November 1, 2025 15:12
@yeonjuan yeonjuan changed the title Fix rule name typo in no-restricted-attr-values documentation fix: rule name typo in no-restricted-attr-values documentation Nov 1, 2025
@yeonjuan yeonjuan changed the title fix: rule name typo in no-restricted-attr-values documentation docs: rule name typo in no-restricted-attr-values documentation Nov 1, 2025
@yeonjuan yeonjuan merged commit 0e3f5c0 into main Nov 1, 2025
8 of 12 checks passed
@yeonjuan yeonjuan deleted the copilot/fix-unexpected-property-issue branch November 1, 2025 16:45
@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.56%. Comparing base (bfdeb29) to head (6b41aa3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #434   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files          84       84           
  Lines        2788     2788           
  Branches      777      777           
=======================================
  Hits         2748     2748           
  Misses         40       40           
Flag Coverage Δ
unittest 98.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Unexpected property "attrValuePatterns"

2 participants