Skip to content

Instantly share code, notes, and snippets.

@grasmash
Last active September 29, 2017 20:19
Show Gist options
  • Save grasmash/09a3cb608fa4be8f40494f4abd8537e6 to your computer and use it in GitHub Desktop.
Save grasmash/09a3cb608fa4be8f40494f4abd8537e6 to your computer and use it in GitHub Desktop.
From 8fc6248eaa2e401ca88f3d1357b99dda80ba08b1 Mon Sep 17 00:00:00 2001
From: Matthew Grasmick <[email protected]>
Date: Fri, 29 Sep 2017 16:16:05 -0400
Subject: [PATCH] Updating theme.
---
docroot/themes/custom/canarycog/.eslintignore | 3 ++-
docroot/themes/custom/canarycog/gulp-tasks/lint-js.js | 14 +++++++-------
docroot/themes/custom/canarycog/gulpfile.js | 3 ++-
docroot/themes/custom/canarycog/package.json | 5 +++++
4 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/docroot/themes/custom/canarycog/.eslintignore b/docroot/themes/custom/canarycog/.eslintignore
index 71e97db..734741a 100644
--- a/docroot/themes/custom/canarycog/.eslintignore
+++ b/docroot/themes/custom/canarycog/.eslintignore
@@ -1 +1,2 @@
-gulp-tasks/*
\ No newline at end of file
+gulp-tasks/*
+gulpfile.js
diff --git a/docroot/themes/custom/canarycog/gulp-tasks/lint-js.js b/docroot/themes/custom/canarycog/gulp-tasks/lint-js.js
index 01122bb..8a3ca1a 100644
--- a/docroot/themes/custom/canarycog/gulp-tasks/lint-js.js
+++ b/docroot/themes/custom/canarycog/gulp-tasks/lint-js.js
@@ -10,15 +10,15 @@ module.exports = function (gulp, plugins, options) {
gulp.task('lint:js', function () {
return gulp.src(options.jsLinting.files.theme)
.pipe(plugins.plumber())
- .pipe(plugins.eslint())
- .pipe(plugins.eslint.format())
+ .pipe(plugins.gulpEslint())
+ .pipe(plugins.gulpEslint.format())
.pipe(plugins.plumber.stop());
});
gulp.task('lint:js-gulp', function () {
return gulp.src(options.jsLinting.files.gulp)
.pipe(plugins.plumber())
- .pipe(plugins.eslint({
+ .pipe(plugins.gulpEslint({
useEslintrc: true,
ecmaFeatures: {
modules: true,
@@ -30,15 +30,15 @@ module.exports = function (gulp, plugins, options) {
es6: true
}
}))
- .pipe(plugins.eslint.format())
+ .pipe(plugins.gulpEslint.format())
.pipe(plugins.plumber.stop());
});
// Lint JavaScript and throw an error for a CI to catch.
gulp.task('lint:js-with-fail', function () {
return gulp.src(options.jsLinting.files.theme)
- .pipe(plugins.eslint())
- .pipe(plugins.eslint.format())
- .pipe(plugins.eslint.failOnError());
+ .pipe(plugins.gulpEslint())
+ .pipe(plugins.gulpEslint.format())
+ .pipe(plugins.gulpEslint.failOnError());
});
};
diff --git a/docroot/themes/custom/canarycog/gulpfile.js b/docroot/themes/custom/canarycog/gulpfile.js
index 4b78851..d2dd3ea 100644
--- a/docroot/themes/custom/canarycog/gulpfile.js
+++ b/docroot/themes/custom/canarycog/gulpfile.js
@@ -72,7 +72,8 @@ var plugins = require('gulp-load-plugins')({
'gulp-sass-glob': 'sassGlob',
'run-sequence': 'runSequence',
'gulp-clean-css': 'cleanCSS',
- 'gulp-stylelint': 'gulpStylelint'
+ 'gulp-stylelint': 'gulpStylelint',
+ 'gulp-eslint': 'gulpEslint'
}
});
diff --git a/docroot/themes/custom/canarycog/package.json b/docroot/themes/custom/canarycog/package.json
index d69239d..a712356 100644
--- a/docroot/themes/custom/canarycog/package.json
+++ b/docroot/themes/custom/canarycog/package.json
@@ -10,6 +10,11 @@
"breakpoint-sass": "2.7.0",
"browser-sync": "2.17.x",
"del": "2.2.x",
+ "eslint": "3.19.0",
+ "eslint-config-airbnb": "14.1.0",
+ "eslint-plugin-import": "2.2.0",
+ "eslint-plugin-jsx-a11y": "4.0.0",
+ "eslint-plugin-react": "6.10.3",
"gulp": "3.9.x",
"gulp-autoprefixer": "3.1.x",
"gulp-clean-css": "2.0.13",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment