-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better
require-closing-tags
support (#188)
* add test case covering non-void self-closing tag when self-closing is enforced * don't close non-void elements * add test case covering math self close exception * clarify names * re-implement foreign context check * foreign context doesn't include the opening node itself * rewrite custom element checks to enforce the rule when possible * update custom tag tests * add custom tag test for children * replace custom tag check with regex + custom pattern option * add tests for custom pattern option * add test for preferred self closing custom tag with no children * Update require-closing-tags.md * add `mspace` to spellcheck https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mspace * prettier * `customPattern` string -> `customPatterns` string array * format * lint * Update docs/rules/require-closing-tags.md Co-authored-by: YeonJuan <yeonjuan93@naver.com> * update test to expect removal of closing tag when fixing * remove closing tag in fixed output * update fixes * update tests to reflect new independent options spec * replace `allowSelfClosingCustom` + `customPatterns` with independent `selfClosingCustomPatterns` option and update foreign context handling to compensate * Update require-closing-tags.md * format * update default to disallow self-closing custom tags * update docs * format --------- Co-authored-by: YeonJuan <yeonjuan93@naver.com>
- Loading branch information
Showing
4 changed files
with
121 additions
and
37 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
"noembed", | ||
"roletype", | ||
"nextid", | ||
"screenreader" | ||
"screenreader", | ||
"mspace" | ||
] | ||
} |
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