Skip to content

Commit 17dcbd1

Browse files
committed
ci: add eslint to the github action
1 parent 99a5fb4 commit 17dcbd1

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

.eslintrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
'env': {
3+
'browser': true,
4+
'commonjs': true,
5+
'es2021': true,
6+
},
7+
'extends': 'google',
8+
'overrides': [],
9+
'parserOptions': {
10+
'ecmaVersion': 'latest',
11+
},
12+
'rules': {
13+
'max-len': [
14+
'error',
15+
{'code': 120, 'ignoreTemplateLiterals': true, 'ignoreStrings': true}],
16+
'valid-jsdoc': [
17+
2, {
18+
'prefer': {'return': 'returns'},
19+
}],
20+
},
21+
};

.gcloudignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# $ gcloud topic gcloudignore
88
#
99
.gcloudignore
10+
.eslintrc.js
1011
# If you would like to upload your .git directory, .gitignore file or files
1112
# from your .gitignore file, remove the corresponding line
1213
# below:

.github/workflows/node.js.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ jobs:
2828
cache: 'npm'
2929
- run: npm ci
3030
- run: npm test
31+
- name: Run ESLint
32+
run: eslint

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"googleapis": "110.0.0"
1414
},
1515
"devDependencies": {
16+
"eslint": ">=5.16.0",
17+
"eslint-config-google": "^0.14.0",
1618
"jest": "^29.4.2"
1719
}
1820
}

0 commit comments

Comments
 (0)