Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Update eslint comments (#30)
Browse files Browse the repository at this point in the history
* remove inline comments to fix babel compiling errors

* fixes errors on node v4.x

* got rid of linting error

* updates for clarity
  • Loading branch information
stevebosworth authored and Thomas Kelly committed Jul 28, 2017
1 parent 30752d4 commit 9ad368f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/slate-tools/.babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
"shopify/node"
"shopify"
],
"plugins": [
["add-shopify-header", {
Expand Down
3 changes: 1 addition & 2 deletions packages/slate-tools/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": [
"plugin:shopify/esnext",
"plugin:shopify/node",
"plugin:shopify/mocha"
"plugin:shopify/node"
],
"rules": {
"no-console": 0,
Expand Down
1 change: 1 addition & 0 deletions packages/slate-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"babel-preset-shopify": "15.0.1",
"babel-register": "6.18.0",
"eslint": "3.10.2",
"eslint-plugin-node": "3.0.4",
"eslint-plugin-shopify": "15.1.0"
},
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion packages/slate-tools/src/config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import {join, normalize} from 'path';
import {existsSync} from 'fs';
import findRoot from 'find-root';

const workingDirectory = process.cwd();
const currentDirectory = __dirname;

const themeRoot = findRoot(workingDirectory);
const defaultGulpPath = join(themeRoot, normalize('node_modules/.bin/gulp'));
// Legacy path for older versions of Node.
const legacyGulpPath = join(themeRoot, normalize('node_modules/@shopify/slate-tools/node_modules/.bin/gulp'));

const config = {
gulpFile: join(currentDirectory, 'gulpfile.js'),
gulp: join(themeRoot, normalize('node_modules/.bin/gulp')),
gulp: existsSync(defaultGulpPath) ? defaultGulpPath : legacyGulpPath,
themeRoot,
};

Expand Down

0 comments on commit 9ad368f

Please sign in to comment.