Home

Awesome

eipw

The EIP validator that's one more than eipv.

USAGE:
    eipw [OPTIONS] [SOURCES]...

ARGS:
    <SOURCES>...    Files and/or directories to check

OPTIONS:
        --format <FORMAT>     Output format [default: text] [possible values: text, json]
    -h, --help                Print help information
        --lints <LINTS>       Additional lints to enable
        --list-lints          List all available lints
        --no-default-lints    Do not enable the default lints

Demo

Example EIP

---
eip: 2
description: A really short example of an EIP.
title: Sample of an EIP
author: Sam Wilson (@SamWilsn)
discussions-to: https://example.com/
status: Living
type: Meta
created: 2022-06-30
---

## Specification

Implementers of this EIP must...

## Abstract

This is an abstract!

Output

error[markdown-order-section]: section `Specification` must come after `Motivation`
  --> /tmp/demo.md
   |
12 | ## Specification
   |
error[preamble-order]: preamble header `description` must come after `title`
 --> /tmp/demo.md
  |
3 | description: A really short example of an EIP.
  |

Lints

idDescription
markdown-html-commentsThere are no HTML comments in review-ready EIPs
markdown-json-citeAll csl-json code blocks adhere to the correct schema.
markdown-link-firstFirst mention of an EIP must be a link.
markdown-link-statusEIPs linked in the body have statuses further along than the current proposal.
markdown-no-backticksNo proposals are referenced inside backticks (eg. `EIP-1234`).
markdown-order-sectionThere are no extra sections and the sections are in the correct order.
markdown-re-eip-dashOther EIPs are referenced using EIP-X, not EIPX or EIP X.
markdown-re-erc-dashOther ERCs are referenced using ERC-X, not ERCX or ERC X.
markdown-refsERCs are referenced using ERC-X, while other proposals use EIP-X.
markdown-rel-linksAll URLs in the page are relative.
markdown-req-sectionRequired sections are present in the body of the proposal.
markdown-heading-firstNo content appears between preamble and first heading.
markdown-headings-spaceHeaders have a space after the leading '#' characters.
preamble-authorThe author header is correctly formatted, and there is at least one GitHub user listed.
preamble-date-createdThe created header is a date.
preamble-date-last-call-deadlineThe last-call-deadline header is a date.
preamble-discussions-toThe discussions-to header is a valid URL.
preamble-eipThe eip header is a non-negative integer.
preamble-enum-categoryThe category header is a recognized value.
preamble-enum-statusThe status header is a recognized value.
preamble-enum-typeThe type header is a recognized value.
preamble-file-nameThe file name reflects the EIP number.
preamble-len-descriptionThe description header isn't too long.
preamble-len-titleThe title header isn't too long.
preamble-len-requiresThe requires header has at least one item.
preamble-list-authorThe author header is a correctly formatted comma-separated list.
preamble-list-requiresThe requires header is a correctly formatted comma-separated list.
preamble-no-dupThere are no duplicate headers.
preamble-orderThe preamble headers are in the correct order.
preamble-re-descriptionThe description doesn't contain "standard" or similar words.
preamble-re-description-colonThe description doesn't contain any ":" characters.
preamble-re-description-eip-dashEIPs referenced in the description header use a dash.
preamble-re-description-erc-dashERCs referenced in the description header use a dash.
preamble-re-discussions-toThe discussions-to header points to Ethereum Magicians
preamble-re-titleThe title doesn't contain "standard" or similar words.
preamble-re-title-colonThe title doesn't contain any ":" characters.
preamble-re-title-eip-dashEIPs referenced in the title header use a dash.
preamble-re-title-erc-dashERCs referenced in the title header use a dash.
preamble-refs-descriptionERCs referenced in the description header use the ERC- prefix.
preamble-refs-titleERCs referenced in the title header use the ERC- prefix.
preamble-reqAll required preamble headers are present.
preamble-req-categoryThe category header is present only when required.
preamble-req-last-call-deadlineThe last-call-deadline header is present only when required.
preamble-req-withdrawal-reasonThe withdrawal-reason header is present only when required.
preamble-requires-ref-descriptionProposals mentioned in the description header appear in the requires header.
preamble-requires-ref-titleProposals mentioned in the title header appear in the requires header.
preamble-requires-statusEIPs listed in requires have statuses further along than the current proposal.
preamble-trimThere is no extra whitespace around preamble fields.
preamble-uint-requiresThe requires header is a sorted list of non-negative integers.

JavaScript / WebAssembly

eipw-lint-js packages eipw as an npm package, for use in JavaScript / TypeScript.

You can find the package on npm.

Building & Publishing

cd eipw-lint-js
wasm-pack test --node
wasm-pack build -t nodejs
wasm-pack publish -t nodejs