Pros | Cons |
---|---|
Full-featured, syntax-aware linting. | Scripting knowledge required. |
Avoids having to maintain prose in JSON/YAML. | Access to source information required. |
Linting output reports meaningful file locations. |
This file contains hidden or 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
document.getElementsByClassName('ReactBash').getElementsByTagName('input').onkeydown = function (evt) { | |
if (evt.which === 13) { | |
evt.preventDefault(); | |
evt.stopPropagation(); | |
return false; | |
} | |
}; |
This file contains hidden or 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
extends: existence | |
message: "Consider removing 'dialog'." | |
level: warning | |
ignorecase: true | |
tokens: | |
- 'dialog (?:box)' |
This file contains hidden or 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
extends: substitution | |
message: "Consider using '%s' instead of '%s'" | |
level: warning | |
ignorecase: false | |
# swap maps tokens in form of bad: good | |
swap: | |
abundance: plenty | |
accelerate: speed up | |
accompany: go with | |
address: discuss |
This file contains hidden or 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
StylesPath = styles | |
MinAlertLevel = suggestion | |
[*.md] | |
BasedOnStyles = Vale, write-good | |
Vale.Spelling = NO | |
write-good.Passive = NO |
This file contains hidden or 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
import subprocess | |
import sys | |
# pip install PyYAML | |
import yaml | |
def lint_keys(data, keys): | |
"""Recursively lint the given data. | |
""" |
This file contains hidden or 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
openapi: 3.0.0 | |
info: | |
title: Sample API | |
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. | |
version: 0.1.9 | |
servers: | |
- url: http://api.example.com/v1 | |
description: Optional server description, e.g. Main (production) server | |
- url: http://staging-api.example.com | |
description: Optional server description, e.g. Internal staging server for testing |
Pros | Cons |
---|---|
Full-featured, syntax-aware linting. | Scripting knowledge required. |
Involves maintaining prose in JSON/YAML. | |
Linting output doesn't report meaningful file locations. |
Pros | Cons |
---|---|
Straightforward; no scripting or workflow adjustments required. | No support for syntax-related features. |
More likely to encounter false positives related to formatting. | |
Involves maintaining prose in JSON/YAML. |
This file contains hidden or 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
StylesPath = path/to/some/directory | |
MinAlertLevel = error | |
[*.md] | |
BasedOnStyles = Microsoft, MyOrganization | |
# Disabled in favor of MyOrganization.Headings, which has an | |
# exception's list tailored to MyOrganization's content. | |
Microsoft.Headings = NO |
NewerOlder