no unused dfns - speced/respec GitHub Wiki

no-unused-dfns linting rule

Default: false

Warns when a definition (<dfn>) is never referenced anywhere in the document and is not exported.

How to enable

var respecConfig = {
  lint: {
    "no-unused-dfns": true,
  },
};

Example violation

<!-- Defined but never linked to anywhere in the document: -->
<dfn>orphaned concept</dfn>

How to fix

Choose one:

  1. Link to it somewhere in the document: [=orphaned concept=]
  2. Export it so other specs can use it: <dfn class="export">orphaned concept</dfn>
  3. Remove the <dfn> if the term is no longer needed
  4. Use a plain element if you want the text styled as a definition but don't need linking: <span class="dfn-paneled">term</span>

How to disable

var respecConfig = {
  lint: { "no-unused-dfns": false },
};
⚠️ **GitHub.com Fallback** ⚠️