-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize on RFC <number>
#15
Conversation
Enforce a space between `RFC` and the number.
First commit seems 👍 to me. Second commit, I think I'd prefer to see us do something upstream about Trott/remark-lint-prohibited-strings#2 to make it a bit more user-friendly. |
OK, I've resolved that, and will push out a new version of that plugin, then incorporate it into this preset, and then land these changes. |
remark-lint-prohibited-strings provides better messages for regexp-y things, which will come in handy for #15
Look at this beautiful output! doc/api/buffer.md
181:17-181:35 warning Use "RFC <number>" instead of "RFC4648" prohibited-strings remark-lint
184:31-184:38 warning Use "RFC <number>" instead of "RFC1345" prohibited-strings remark-lint
doc/api/dns.md
115:65-115:72 warning Use "RFC" instead of "rfc" prohibited-strings remark-lint
115:65-115:72 warning Use "RFC <number>" instead of "rfc5952" prohibited-strings remark-lint
558:34-558:41 warning Use "RFC" instead of "rfc" prohibited-strings remark-lint
558:34-558:41 warning Use "RFC <number>" instead of "rfc5952" prohibited-strings remark-lint
561:52-561:59 warning Use "RFC" instead of "rfc" prohibited-strings remark-lint
561:52-561:59 warning Use "RFC <number>" instead of "rfc5952" prohibited-strings remark-lint
650:65-650:72 warning Use "RFC" instead of "rfc" prohibited-strings remark-lint
650:65-650:72 warning Use "RFC <number>" instead of "rfc5952" prohibited-strings remark-lint
1011:34-1011:41 warning Use "RFC" instead of "rfc" prohibited-strings remark-lint
1011:34-1011:41 warning Use "RFC <number>" instead of "rfc5952" prohibited-strings remark-lint
1014:52-1014:59 warning Use "RFC" instead of "rfc" prohibited-strings remark-lint
1014:52-1014:59 warning Use "RFC <number>" instead of "rfc5952" prohibited-strings remark-lint
doc/api/http.md
2091:23-2092:15 warning Use "RFC <number>" instead of "RFC2616" prohibited-strings remark-lint
doc/api/http2.md
3226:1-3227:17 warning Use "RFC <number>" instead of "RFC7540" prohibited-strings remark-lint |
remark-lint-prohibited-strings provides better messages for regexp-y things, which will come in handy for nodejs/remark-preset-lint-node#15
remark-lint-prohibited-strings provides better messages for regexp-y things, which will come in handy for nodejs/remark-preset-lint-node#15
Refs: nodejs/node#26695 (comment)
The first commit prohibits
rfc
andRfc
to enforce uppercaseRFC
.As of nodejs/node@3b6344c this gives:
The second commit enforces a space between
RFC
and the number. This is possibly an abuse of prohibited-strings, but it does catch the cases where the space is omitted (the user message isn't that clear, especially if you are unfamiliar with regular expressions). As of nodejs/node@3b6344c: