From 2fb5c678c44cca90adbd5e9c7b3a7ce2141e490f Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 18 Apr 2016 10:56:42 -0400 Subject: [PATCH 1/5] Ignore node_modules when linting --- generators/app/index.js | 3 ++- generators/app/templates/_eslintignore | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 generators/app/templates/_eslintignore diff --git a/generators/app/index.js b/generators/app/index.js index a73ea26..7c18b7e 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -86,13 +86,14 @@ module.exports = yeoman.Base.extend({ mkdirp('dist/assets'); copier([ + ['_eslintignore', '.eslintignore'], ['_eslintrc', '.eslintrc'], ['_gitignore', '.gitignore'], '_sanitize.styl', 'CONTRIBUTING.md', 'example/index.js', 'example/style.styl', - 'example/__tests__/unit.js', + 'example/__tests__/index.js', 'index.js', 'jest.setup.js', 'parallelize.sh', diff --git a/generators/app/templates/_eslintignore b/generators/app/templates/_eslintignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/generators/app/templates/_eslintignore @@ -0,0 +1 @@ +node_modules/ From 2863e5765a2a02e3b92d45c6e025f4c297c3613f Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 18 Apr 2016 10:57:07 -0400 Subject: [PATCH 2/5] Rename __tests__/unit.js -> __tests__/index.js --- generators/app/templates/example/__tests__/{unit.js => index.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename generators/app/templates/example/__tests__/{unit.js => index.js} (100%) diff --git a/generators/app/templates/example/__tests__/unit.js b/generators/app/templates/example/__tests__/index.js similarity index 100% rename from generators/app/templates/example/__tests__/unit.js rename to generators/app/templates/example/__tests__/index.js From 83453c8e958ca447286773504ad807673cf813ec Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 18 Apr 2016 10:57:32 -0400 Subject: [PATCH 3/5] Upgrade to React 15.x No codebase changes. --- generators/app/templates/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/app/templates/package.json b/generators/app/templates/package.json index 4956b52..6f52717 100644 --- a/generators/app/templates/package.json +++ b/generators/app/templates/package.json @@ -8,8 +8,8 @@ "email": "<%= authorEmail %>" }, "dependencies": { - "react": "^0.14.7", - "react-dom": "^0.14.7" + "react": "^15.0.0", + "react-dom": "^15.0.0" }, "devDependencies": { "autoprefixer-stylus": "^0.9.2", From 7c5d3a3c0e6555bc962048132e58b7d4c2cb00a4 Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 18 Apr 2016 10:59:42 -0400 Subject: [PATCH 4/5] Use the Github node gitignore template --- generators/app/templates/_gitignore | 41 +++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/generators/app/templates/_gitignore b/generators/app/templates/_gitignore index 53ccf07..7d8e3b6 100644 --- a/generators/app/templates/_gitignore +++ b/generators/app/templates/_gitignore @@ -1,6 +1,37 @@ -npm-debug.log -.DS_Store -node_modules/ -.sass-cache/ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript -coverage/ +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history + +# OS X folder metadata +.DS_Store From c1b4fffa30ee5420f94e2733b801c2d3249b9b5f Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 18 Apr 2016 15:18:18 -0400 Subject: [PATCH 5/5] Sub-out eslintify for eslint --- generators/app/templates/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/app/templates/package.json b/generators/app/templates/package.json index 6f52717..b37dd81 100644 --- a/generators/app/templates/package.json +++ b/generators/app/templates/package.json @@ -21,8 +21,8 @@ "babelify": "^7.2.0", "browserify": "^13.0.0", "budo": "^8.1.0", + "eslint": "^2.7.0", "eslint-plugin-react": "^4.2.3", - "eslintify": "^2.0.0", "jest-cli": "^0.9.2", "stylus": "^0.54.2", "uglify-js": "^2.6.2", @@ -50,7 +50,7 @@ "build": "npm run js && npm run css", "release": "npm run css:release && npm run html:release && npm run js:release", "start": "sh parallelize.sh \"npm run css:watch\" \"npm run js:watch\"", - "lint": "browserify index.js -t eslintify -t babelify --colors > /dev/null", + "lint": "eslint --quiet *.js **/*.js", "test": "jest --verbose", "coverage": "jest --coverage" }