Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 590 Bytes

ban-attributes.md

File metadata and controls

26 lines (17 loc) · 590 Bytes

Disallows a set of attributes from being used (ban-attributes)

You may prefer to disallow some attributes for various reasons in templates, this simply allows you to create such a denylist.

Rule Details

This rule disallows a list of attributes within templates.

The following patterns are considered warnings:

/*eslint lit/ban-attributes: ["error", "attr"] */
html`<x-foo attr>`;

The following patterns are not warnings:

html`<x-foo attr>`;

When Not To Use It

If you don't have any particular attributes you wish to disallow, you do not need this rule.