Skip to content

Commit 430e6b2

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

39 files changed

+151
-104
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: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,47 @@ jobs:
66
build:
77
runs-on: ubuntu-18.04
88
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
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
17+
misspell:
18+
name: Check Spelling
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check Out
22+
uses: actions/checkout@v2
23+
- name: Install
24+
run: |
25+
wget -O - -q https://git.io/misspell | sh -s -- -b .
26+
- name: Misspell
27+
run: |
28+
git ls-files --empty-directory | xargs ./misspell -error
29+
trailing-whitespace:
30+
name: Trailing whitespace
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Check for trailing whitespace
35+
run: "! git grep -EIn $'[ \t]+$'"
36+
yamllint:
37+
name: YAML
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: actions/setup-python@v2
42+
with:
43+
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
44+
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install yamllint
49+
- name: YAML Lint
50+
run: |
51+
# return non-zero exit code on warnings
52+
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)