Skip to content

Commit 2c2587e

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

39 files changed

+154
-106
lines changed

.github/invite-contributors.yaml

+1-1
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

+47-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,53 @@
1-
name: Lint Markdown
1+
name: Lint
22

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

+9
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

+2-2
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

+6-6
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

+4-4
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

+1-1
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

+2-2
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

+1-1
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

+3-2
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`

docs/head.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function (Vue, { head }) {
2222
rel: 'stylesheet',
2323
href: 'https://some-server.com/external-styleheet.css'
2424
})
25-
25+
2626
// Add an external JavaScript before the closing </body> tag
2727
head.script.push({
2828
src: 'https://some-server.com/external-script.js',
@@ -87,8 +87,9 @@ export default {
8787

8888
## How to overwrite from child component
8989

90-
If you need to overwrite meta tags, add `key` property.
91-
Gridsome is passing `tagIdKeyName: 'key'` to vue-meta as default option.
90+
If you need to overwrite meta tags, add `key` property.
91+
92+
Gridsome is passing `tagIdKeyName: 'key'` to vue-meta as default option.
9293

9394
```js
9495
// parent component

docs/querying-data.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export default {
227227
functional: true,
228228
render(createElement, context) {
229229
const { content } = context.data.$static.post
230-
230+
231231
return createElement('div', {
232232
domProps: {
233233
innerHTML: content

examples/create-pages-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Programmatically generate pages
2+
title: Programmatically generate pages
33
filepath: gridsome.server.js
44
filetype: js
55
order: 10

examples/dynamic-routing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ order: 4
88
```html
99
<template>
1010
<div v-if="user">
11-
<!-- Add a [param].vue file in src/pages
11+
<!-- Add a [param].vue file in src/pages
1212
folder to create a dynamic route -->
1313
<h1>{{ user.name }}</h1>
1414
</div>

examples/progressive-images.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ order: 10
1212

1313
<g-image src="~/assets/images.jpg" width="500" />
1414

15-
<!-- This will render a small
15+
<!-- This will render a small
1616
ultra-compressed, blurred inline base64 image
1717
before it's lazy loaded into view with
1818
Intersection Observer -->

examples/taxonomy-pages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ order: 5
77
```html
88
<template>
99
<Layout>
10-
<!-- Creates a template for a "Tag" that
10+
<!-- Creates a template for a "Tag" that
1111
lists all post with same tag -->
1212
<h1>{{ $page.tag.title }}</h1>
1313
<ul>

platforms/logos/elastic-path.svg

+3-3
Loading

src/assets/style/bullet-list.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
vertical-align: middle;
88
margin-top: -2px;
99
color: var(--primary-color);
10-
}
11-
}
10+
}
11+
}

src/assets/style/button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
&.primary {
5353
color: #FFF;
5454
background-color: var(--primary-color-dark);
55-
55+
5656
&:after {
5757
border-color: rgba(0,0,0,.1);
5858
}

src/assets/style/docs.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
}
2323

24-
24+
2525
h1, h2, h3 {
2626
padding-top: 6rem;
2727
margin-top: -5rem;
@@ -66,7 +66,7 @@
6666
transition: border-color .3s;
6767
}
6868
}
69-
69+
7070
h3 { opacity: .9 }
7171

7272
h4, h5, h6 { opacity: .8 }
@@ -92,7 +92,7 @@
9292
display: flex;
9393
align-items: center;
9494
padding-top: 1rem;
95-
95+
9696
&:not(:hover) {
9797
color: var(--primary-color-dark);
9898
}

src/assets/style/grid.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ul.flex {
8585

8686
&--collapse {
8787
grid-gap: 0;
88-
88+
8989
> div:first-child {
9090
border-right:0;
9191
border-top-right-radius: 0;

src/assets/style/links.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ a {
99
color: var(--body-color);
1010
text-decoration-color: var(--body-color);
1111
}
12-
12+
1313
svg + & {
1414
margin-left: .5rem;
1515
}
@@ -22,4 +22,4 @@ a {
2222

2323
a:hover:not(.active) {
2424
opacity: 1;
25-
}
25+
}

src/assets/style/sidebar.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
&.active--exact {
6767
color: var(--primary-color-dark);
6868
}
69-
69+
7070
&:hover {
7171
color: var(--primary-color);
7272
}
@@ -127,7 +127,7 @@
127127
margin:0;
128128
order: 2;
129129
padding-bottom: 150px;
130-
130+
131131
} + .section {
132132
margin-left: 0;
133133
width: 100%;

src/components/Card.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default {
6161
overflow: hidden;
6262
border-bottom: 1px solid var(--border-color);
6363
transition: border-color .3s;
64-
64+
6565
img {
6666
margin: 0;
6767
width: 100%;

0 commit comments

Comments
 (0)