Skip to content

Commit fad3baf

Browse files
author
Eric Koleda
committed
Switch to eslint and fix a lot of linting errors.
1 parent b8ed0b0 commit fad3baf

34 files changed

+1690
-450
lines changed

.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
"extends": "google",
3+
"globals": {
4+
"HtmlService": false,
5+
"Logger": false,
6+
"OAuth2": false,
7+
"UrlFetchApp": false,
8+
},
9+
"rules": {
10+
"comma-dangle": "off",
11+
"no-var": "off"
12+
}
13+
};

dist/OAuth2.gs

Lines changed: 290 additions & 147 deletions
Large diffs are not rendered by default.

gulpfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var del = require('del');
55
var rename = require("gulp-rename");
66
var jshint = require('gulp-jshint');
77
var stylish = require('jshint-stylish');
8+
const eslint = require('gulp-eslint');
89

910
gulp.task('dist', ['clean'], function() {
1011
gulp.src('src/*.gs')
@@ -19,8 +20,9 @@ gulp.task('clean', function() {
1920
]);
2021
});
2122

22-
gulp.task('lint', function() {
23-
return gulp.src(['src/*.gs', 'test/**/*.js'])
24-
.pipe(jshint())
25-
.pipe(jshint.reporter(stylish));
23+
gulp.task('lint', () => {
24+
return gulp.src(['src/*.gs', 'samples/*.gs', 'test/**/*.js', '!node_modules/**'])
25+
.pipe(eslint())
26+
.pipe(eslint.format())
27+
.pipe(eslint.failAfterError());
2628
});

0 commit comments

Comments
 (0)