Skip to content

Commit fad1e82

Browse files
committed
feat: add GitHub actions for spell checking, trailing whitespace and YAML
Lint Markdown and YAML. Fix spelling.
1 parent 1f5893f commit fad1e82

39 files changed

+153
-105
lines changed

.github/invite-contributors.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# team name
2-
team: Maintainers
2+
team: Maintainers

.github/workflows/lint.yaml

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,51 @@ name: Lint Markdown
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
markdown:
7+
name: Markdown Lint
78
runs-on: ubuntu-18.04
89
steps:
9-
- uses: actions/checkout@v2
10-
- name: Use Node.js
11-
uses: actions/setup-node@v2
12-
with:
13-
node-version: '14'
14-
- name: Install modules
15-
run: yarn
16-
- run: yarn markdown:lint
10+
- uses: actions/checkout@v2
11+
- name: Use Node.js
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: '14'
15+
- name: Install modules
16+
run: yarn
17+
- run: yarn markdown:lint
18+
misspell:
19+
name: Check Spelling
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check Out
23+
uses: actions/checkout@v2
24+
- name: Install
25+
run: |
26+
wget -O - -q https://git.io/misspell | sh -s -- -b .
27+
- name: Misspell
28+
run: |
29+
git ls-files --empty-directory | xargs ./misspell -error
30+
trailing-whitespace:
31+
name: Trailing whitespace
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Check for trailing whitespace
36+
run: "! git grep -EIn $'[ \t]+$'"
37+
yamllint:
38+
name: YAML
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
- uses: actions/setup-python@v2
43+
with:
44+
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
45+
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install yamllint
50+
- name: YAML Lint
51+
run: |
52+
# return non-zero exit code on warnings
53+
yamllint --strict .

.yamllint

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
extends: default
4+
5+
rules:
6+
colons: disable
7+
document-start: disable
8+
line-length: disable
9+
truthy: false

contributors/contributors.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
bio: "Web Developer"
217217
avatar: ./images/rcheuk.png
218218
twitter: "@rachel_cheuk"
219-
219+
220220
- id: remi2j
221221
name: Remi de Juvigny
222222
bio: "Software Engineer"
@@ -281,4 +281,4 @@
281281
name: Danilo Raisi
282282
bio: "Software Engineer"
283283
avatar: ./images/daniloraisi.jpeg
284-
twitter: "@daniloraisi"
284+
twitter: "@daniloraisi"

docs/assets-css.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,14 @@ export default function (Vue, { head }) {
367367
rel: 'stylesheet',
368368
href: 'https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css',
369369
})
370-
370+
371371
head.link.push({
372372
rel: 'stylesheet',
373373
href: 'https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900',
374374
});
375375

376376
Vue.use(Vuetify)
377-
377+
378378
// Set default layout as a global component
379379
Vue.component('Layout', DefaultLayout)
380380
}
@@ -391,17 +391,17 @@ export default function (Vue, { appOptions, head }) {
391391
rel: 'stylesheet',
392392
href: 'https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css',
393393
})
394-
394+
395395
head.link.push({
396396
rel: 'stylesheet',
397397
href: 'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900',
398398
});
399-
399+
400400
const opts = { ... } //opts includes, vuetify themes, icons, etc.
401401
Vue.use(Vuetify)
402-
402+
403403
appOptions.vuetify = new Vuetify(opts);
404-
404+
405405
// Set default layout as a global component
406406
Vue.component('Layout', DefaultLayout)
407407
}

docs/assets-scripts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ import moment from 'moment';
142142
export default function (Vue) {
143143
// Set default layout as a global component
144144
Vue.component('Layout', DefaultLayout)
145-
145+
146146
//Use Moment.Js library inside our project
147147
Object.defineProperty(Vue.prototype, '$moment', {
148148
value: moment
@@ -203,17 +203,17 @@ In the same way, you can use any external library that causes issues in server s
203203

204204
<script>
205205
// import $ from 'jquery'; //import it inside main.js
206-
206+
207207
export default {
208208
name: 'Index',
209209
mounted() {
210210
//require our external library and load it in window
211211
window.owl = require('owl-carousel')
212212
window.$ = require('jquery')
213-
213+
214214
// This works now
215215
$('.some-carousel').owlCarousel()
216-
216+
217217
}
218218
}
219219
</script>

docs/body-html-attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Global body or head attributes are added in `src/main.js`.
1010
export default function (Vue, { head }) {
1111
// Add attributes to HTML tag
1212
head.htmlAttrs = { lang: 'en' }
13-
13+
1414
// Add attributes to BODY tag
1515
head.bodyAttrs = { class: 'custom-body-class' }
1616
}

docs/deploy-to-az-static-web-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Azure Static Web Apps publishes a website to a prodution environment by building
1111

1212
### Create a static web app
1313

14-
After you created your GitHub repository and commited your code, you can create a static web app from the Azure portal.
14+
After you created your GitHub repository and committed your code, you can create a static web app from the Azure portal.
1515

1616
1. Navigate to the [Azure Portal](https://portal.azure.com)
1717
2. Select **Create a Resource**
@@ -57,7 +57,7 @@ After you sign in with GitHub, enter the repository information.
5757

5858
## View the website
5959

60-
When you create an Azure Static Web App, Azure resources are provisined to make up your app. Also a GitHub Action workflow is created and commited to your repository. This workflow builds and publishes your application.
60+
When you create an Azure Static Web App, Azure resources are provisioned to make up your app. Also a GitHub Action workflow is created and committed to your repository. This workflow builds and publishes your application.
6161

6262
Before you can navigate to your new static site, the deployment build must first finish running.
6363

docs/deploy-to-netlify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Alternatively, you can deploy using a `netlify.toml` file. Create a file in the
1818
command = "gridsome build"
1919
```
2020

21-
More infomation on `netlify.toml` files can be found in the [Netlify docs](https://www.netlify.com/docs/netlify-toml-reference/).
21+
More information on `netlify.toml` files can be found in the [Netlify docs](https://www.netlify.com/docs/netlify-toml-reference/).
2222

2323
**Note:**
2424

docs/dev-tools.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ module.exports = {
3434

3535
## Vetur
3636

37-
[Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) is Vue tooling for VS Code.
37+
[Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) is Vue tooling for VS Code.
38+
3839
Vetur works perfect with Gridsome.
3940

4041
### GraphQL syntax for `<page-query>` and `<static-query>`
4142

42-
Detail is [here](https://github.com/vuejs/vetur/issues/975#issuecomment-461197031)
43+
Detail is [here](https://github.com/vuejs/vetur/issues/975#issuecomment-461197031)
4344

4445
1. Install [GraphQL](https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode)
4546
2. Add this item in `settings.json`

0 commit comments

Comments
 (0)