Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
MinAlertLevel = warning
Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip, Readability, vale/Grafana

Packages = vale/Grafana

StylesPath = styles

[*.md]
BasedOnStyles = Grafana
TokenIgnores = (<http[^\n]+>+?), \*\*[^\n]+\*\*
10 changes: 0 additions & 10 deletions vale/.vale-config/1-Hugo.ini

This file was deleted.

5 changes: 2 additions & 3 deletions vale/.vale.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
MinAlertLevel = suggestion
Packages = Grafana, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip
Packages = Grafana

[*]
[*.md]
BasedOnStyles = Grafana
TokenIgnores = (<http[^\n]+>+?), \*\*[^\n]+\*\*
26 changes: 0 additions & 26 deletions vale/.vale.jsonnet

This file was deleted.

6 changes: 6 additions & 0 deletions vale/Grafana/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
StylesPath = styles

Packages = https://github.com/errata-ai/Hugo/releases/download/v0.3.0/Hugo.zip

[*.md]
TokenIgnores = (<http[^\n]+>+?), \*\*[^\n]+\*\*
3 changes: 1 addition & 2 deletions vale/Grafana/styles/Grafana/Admonitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ script: |
matches := []

for match in text.re_find(`(?i)> \*\*(?:note|warning|caution|tip):?\*\*`, scope, -1) {
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
3 changes: 1 addition & 2 deletions vale/Grafana/styles/Grafana/AltText.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ script: |
text := import("text")
matches := []
for match in text.re_find(`!\[\]\(.*?\)`, scope, -1) {
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
3 changes: 1 addition & 2 deletions vale/Grafana/styles/Grafana/Gerunds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ script: |
matches := []

for match in text.re_find(`^ *[A-Z][a-zA-Z]*ing .*$`, scope, -1) {
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
3 changes: 1 addition & 2 deletions vale/Grafana/styles/Grafana/Shortcodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ script: |
matches := []

for match in text.re_find(`{{% +/?admonition .*%}}`, scope, -1) {
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
matches = append(matches, {begin: match[0].begin, end: match[0].end})
}
1 change: 0 additions & 1 deletion vale/Grafana/styles/Grafana/Spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ message: |
The spell checker doesn't check words with code formatting.
level: error
append: true
dicpath: config/dictionaries
dictionaries:
- en_US-grafana
- en_US-places
5 changes: 0 additions & 5 deletions vale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ sync:
cd $(GIT_ROOT) && vale sync; cd -
npx prettier -w .

.vale.ini ../.vale.ini: ## Generate Vale INI configuration from the Jsonnet data template.
.vale.ini ../.vale.ini: .vale.jsonnet
jsonnet -Se "(import '.vale.jsonnet').container" | sed '$${/^$$/d;}' > .vale.ini
jsonnet -Se "(import '.vale.jsonnet').repository" | sed '$${/^$$/d;}' > ../.vale.ini

.PHONY: Grafana/styles/Grafana/Google
Grafana/styles/Grafana/Google: ## Generate the Grafana style from the Google style.
Grafana/styles/Grafana/Google: google.jsonnet
Expand Down
9 changes: 0 additions & 9 deletions vale/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Vale

The [`.vale.ini`](.vale.ini) file in this directory is only for the container image.
For linting of this repository, the [`.vale.ini`](../.vale.ini) file in the root of the repository is used.
The two files should be mostly similar with the exception of the `Packages` and `StylesPath` configurations.
Perhaps in the future, these will be sourced from a single place.

The Grafana style extends the Google style and disables some rules.
The Google style is vendored in the repository.
To update the Google style, run `make sync`.

To build the container image, run `make grafana/vale`.
Loading