Skip to content

Commit 302650f

Browse files
committed
Enable lint workflow via github actions + delint readmes
1 parent e5a4ac1 commit 302650f

File tree

20 files changed

+138
-76
lines changed

20 files changed

+138
-76
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
# Summary
2+
3+
TODO
4+
15
## Expected Behavior
26

3-
(Include the sample name)
7+
Sample URL:
8+
Description:
49

510
## Actual Behavior
611

7-
## JavaScript Console Output
8-
9-
(View your JavaScript Console to see if there are any errors)
1012

11-
## Specifications
13+
## Steps to Reproduce the Problem
1214

13-
- Browser (Chrome/Internet Explorer/Firefox):
14-
- OS (Mac/Linux/Windows):
15+
1.
16+
1.
17+
1.

.github/linters/.htmlhintrc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"tagname-lowercase": true,
3+
"attr-lowercase": true,
4+
"attr-value-double-quotes": true,
5+
"attr-value-not-empty": false,
6+
"attr-no-duplication": true,
7+
"doctype-first": false,
8+
"tag-pair": true,
9+
"tag-self-close": false,
10+
"spec-char-escape": false,
11+
"id-unique": true,
12+
"src-not-empty": true,
13+
"title-require": false,
14+
"alt-require": true,
15+
"doctype-html5": true,
16+
"id-class-value": false,
17+
"style-disabled": false,
18+
"inline-style-disabled": false,
19+
"inline-script-disabled": false,
20+
"space-tab-mixed-disabled": "space",
21+
"id-class-ad-disabled": false,
22+
"href-abs-or-rel": false,
23+
"attr-unsafe-chars": true,
24+
"head-script-disabled": false
25+
}

.github/workflows/lint.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
name: Lint
16+
on:
17+
workflow_dispatch:
18+
push:
19+
branches:
20+
- master
21+
pull_request:
22+
branches:
23+
- master
24+
jobs:
25+
lint:
26+
concurrency:
27+
group: ${{ github.head_ref || github.ref }}
28+
cancel-in-progress: true
29+
runs-on: ubuntu-20.04
30+
steps:
31+
- uses: actions/[email protected]
32+
with:
33+
fetch-depth: 0
34+
- uses: actions/setup-node@v3
35+
with:
36+
node-version: '14'
37+
- run: npm install
38+
- run: npm run lint
39+
- uses: github/super-linter/[email protected]
40+
if: always()
41+
env:
42+
ERROR_ON_MISSING_EXEC_BIT: true
43+
VALIDATE_JSCPD: false
44+
VALIDATE_JAVASCRIPT_STANDARD: false
45+
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' }}
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.htmllintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ have to jump a couple of legal hurdles.
88
Please fill out either the individual or corporate Contributor License Agreement
99
(CLA).
1010

11-
* If you are an individual writing original source code and you're sure you
12-
own the intellectual property, then you'll need to sign an
13-
[individual CLA](https://developers.google.com/open-source/cla/individual).
14-
* If you work for a company that wants to allow you to contribute your work,
15-
then you'll need to sign a
16-
[corporate CLA](https://developers.google.com/open-source/cla/corporate).
11+
* If you are an individual writing original source code and you're sure you
12+
own the intellectual property, then you'll need to sign an
13+
[individual CLA](https://developers.google.com/open-source/cla/individual).
14+
* If you work for a company that wants to allow you to contribute your work,
15+
then you'll need to sign a
16+
[corporate CLA](https://developers.google.com/open-source/cla/corporate).
1717

1818
Follow either of the two links above to access the appropriate CLA and
1919
instructions for how to sign and return it. Once we receive it, we'll be able to
2020
accept your pull requests.
2121

2222
## Contributing A Patch
2323

24-
1. Submit an issue describing your proposed change to the repo in question.
25-
1. The repo owner will respond to your issue promptly.
24+
1. Submit an issue describing your proposed change to the repository in question.
25+
1. The repository owner will respond to your issue promptly.
2626
1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).
27-
1. Fork the desired repo, develop and test your code changes.
27+
1. Fork the desired repository, develop and test your code changes.
2828
1. Ensure that your code adheres to the existing style in the sample to which you are contributing.
2929
1. Ensure that your code has an appropriate set of unit tests which all pass.
3030
1. Submit a pull request!

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This error will occur during the authorization flow if the host and port used to
6464

6565
### idpiframe_initialization_failed: Failed to read the 'localStorage' property from 'Window'
6666

67-
The Google Sign-in library requires that 3rd party cookies and data storage is enabled in the web browser. For users that run into this error, prompt them to enable the feature or add an exception for accounts.google.com.
67+
The Google Sign-in library requires that third-party cookies and data storage is enabled in the web browser. For users that run into this error, prompt them to enable the feature or add an exception for accounts.google.com.
6868

6969
### idpiframe_initialization_failed: Not a valid origin for the client
7070

@@ -85,7 +85,7 @@ Configure [options](https://github.com/htmllint/htmllint/wiki/Options) in the `.
8585

8686
## Client Library
8787

88-
Google Workspace APIs use the [Google API Javascript client library](https://github.com/google/google-api-javascript-client).
88+
Google Workspace APIs use the [Google API JavaScript client library](https://github.com/google/google-api-javascript-client).
8989

9090
## Contributing
9191

adminSDK/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## Admin SDK
1+
# Admin SDK
22

33
Manage your domains and apps with the [Admin SDK](https://developers.google.com/admin-sdk/).

apps-script/quickstart/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Google Apps Script API Browser Quickstart
22

3-
Complete the steps described in the [quickstart instructions](https://developers.google.com/apps-script/api/quickstart/js), and in about
4-
five minutes you'll have a simple browser application that makes requests to the
3+
Complete the steps described in the [quickstart instructions](https://developers.google.com/apps-script/api/quickstart/js),
4+
and in about five minutes you'll have a simple browser application that makes requests to the
55
Apps Script API.
66

77
## Run
88

99
After following the quickstart instructions, run the sample:
1010

11-
```
12-
python -m SimpleHTTPServer 8000
11+
```shell
12+
python3 -m http.server 8000
1313
```
1414

1515
And opening the web page:
1616

17-
```
17+
```shell
1818
open http://localhost:8000
1919
```

calendar/quickstart/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Calendar API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```
2121

classroom/quickstart/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ classroom API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```

docs/quickstart/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Docs API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```

drive/quickstart/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Drive API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```
2121

gmail/quickstart/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ Gmail API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```
2121

22+

people/quickstart/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ People API.
88

99
After following the quickstart instructions, run the sample:
1010

11-
```
12-
python -m SimpleHTTPServer 8000
11+
```shell
12+
python3 -m http.server 8000
1313
```
1414

1515
And opening the web page:
1616

17-
```
17+
```shell
1818
open http://localhost:8000
1919
```
20+

sheets/quickstart/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ Google Sheets API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```
2121

22+

sheets/snippets/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Google Sheets Browser Snippets
22

3-
Javascript snippets from the [Google Sheets API Guide](https://developers.google.com/sheets/api/guides/values).
3+
JavaScript snippets from the [Google Sheets API Guide](https://developers.google.com/sheets/api/guides/values).
44

55
## Run tests
66

77
Run the snippet tests by starting a local web server:
88

9-
```
10-
python -m SimpleHTTPServer 8000
9+
```shell
10+
python3 -m http.server 8000
1111
```
1212

1313
And opening the web page:
1414

15-
```
15+
```shell
1616
open http://localhost:8000
1717
```

slides/quickstart/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ Google Slides API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```
2121

22+

slides/snippets/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Google Slides Browser Snippets
22

3-
Javascript snippets from the [Google Slides API Guide](https://developers.google.com/slides/how-tos/presentations).
3+
JavaScript snippets from the [Google Slides API Guide](https://developers.google.com/slides/how-tos/presentations).
44

55
## Run tests
66

77
Run the snippet tests by starting a local web server:
88

9-
```
10-
python -m SimpleHTTPServer 8000
9+
```shell
10+
python3 -m http.server 8000
1111
```
1212

1313
And opening the web page:
1414

15-
```
15+
```shell
1616
open http://localhost:8000
1717
```

tasks/quickstart/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ Google Tasks API.
99

1010
After following the quickstart instructions, run the sample:
1111

12-
```
13-
python -m SimpleHTTPServer 8000
12+
```shell
13+
python3 -m http.server 8000
1414
```
1515

1616
And opening the web page:
1717

18-
```
18+
```shell
1919
open http://localhost:8000
2020
```
2121

22+

0 commit comments

Comments
 (0)