You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2016/06/28 14:46:10 UTC
[1/5] fauxton commit: updated refs/heads/master to 5be2610
Repository: couchdb-fauxton
Updated Branches:
refs/heads/master 968f714f2 -> 5be261085
linter: add space-in-parens-rule
PR: #734
PR-URL: https://github.com/apache/couchdb-fauxton/pull/734
Reviewed-By: garren smith <ga...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/747b695b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/747b695b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/747b695b
Branch: refs/heads/master
Commit: 747b695badb56540ba54024bbc75fed3f0dadbbc
Parents: ad2cbec
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Wed Jun 22 11:38:44 2016 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Tue Jun 28 16:45:08 2016 +0200
----------------------------------------------------------------------
.eslintrc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/747b695b/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index c344a00..7cc98db 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -6,7 +6,7 @@
],
"rules-todo": {
- "space-in-parens": 2,
+
"space-unary-ops": 2,
"camelcase": 2
},
@@ -25,7 +25,8 @@
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"no-trailing-spaces": 2,
"semi-spacing": [2, {"before": false, "after": true}],
- "no-empty": 2
+ "no-empty": 2,
+ "space-in-parens": ["error", "never"]
},
"parserOptions": {
[3/5] fauxton commit: updated refs/heads/master to 5be2610
Posted by ro...@apache.org.
add codemod to fix eslint's "space-in-parens"-rule
the codemod fixes the issues found by eslint
PR: #734
PR-URL: https://github.com/apache/couchdb-fauxton/pull/734
Reviewed-By: garren smith <ga...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/cb4ac3fc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/cb4ac3fc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/cb4ac3fc
Branch: refs/heads/master
Commit: cb4ac3fc8a8dc6209b0ac5b216e6251fba8c6741
Parents: 747b695
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Wed Jun 22 11:39:03 2016 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Tue Jun 28 16:46:01 2016 +0200
----------------------------------------------------------------------
codemods/space-in-parens.sh | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/cb4ac3fc/codemods/space-in-parens.sh
----------------------------------------------------------------------
diff --git a/codemods/space-in-parens.sh b/codemods/space-in-parens.sh
new file mode 100755
index 0000000..3c99287
--- /dev/null
+++ b/codemods/space-in-parens.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+./node_modules/.bin/eslint --ext=.jsx,.js --fix . space-in-parens: ["error", "never"]
[4/5] fauxton commit: updated refs/heads/master to 5be2610
Posted by ro...@apache.org.
fix parenthesis spacing
PR: #734
PR-URL: https://github.com/apache/couchdb-fauxton/pull/734
Reviewed-By: garren smith <ga...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/d70343d6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/d70343d6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/d70343d6
Branch: refs/heads/master
Commit: d70343d637f32016d1b7168dd4d19a4f6406f55d
Parents: cb4ac3f
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Wed Jun 22 11:41:11 2016 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Tue Jun 28 16:46:01 2016 +0200
----------------------------------------------------------------------
app/addons/cors/components.react.jsx | 2 +-
app/addons/documents/base.js | 10 +++++-----
app/addons/documents/components/jumptodoc.react.jsx | 2 +-
app/addons/documents/index-results/stores.js | 2 +-
.../index-results/tests/index-results.storesSpec.js | 2 +-
app/addons/documents/shared-resources.js | 2 +-
app/addons/fauxton/components.react.jsx | 2 +-
app/addons/replication/base.js | 2 +-
app/addons/verifyinstall/resources.js | 2 +-
app/core/base.js | 2 +-
10 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/cors/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/cors/components.react.jsx b/app/addons/cors/components.react.jsx
index 8cd42d2..8868997 100644
--- a/app/addons/cors/components.react.jsx
+++ b/app/addons/cors/components.react.jsx
@@ -265,7 +265,7 @@ var CORSController = React.createClass({
},
enableCorsChange: function () {
- if (this.state.corsEnabled && !_.isEmpty(this.state.origins) ) {
+ if (this.state.corsEnabled && !_.isEmpty(this.state.origins)) {
var result = window.confirm(app.i18n.en_US['cors-disable-cors-prompt']);
if (!result) { return; }
}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/documents/base.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/base.js b/app/addons/documents/base.js
index f85c573..e2de385 100644
--- a/app/addons/documents/base.js
+++ b/app/addons/documents/base.js
@@ -22,7 +22,7 @@ function getQueryParam (query) {
return query;
}
-FauxtonAPI.registerUrls( 'allDocs', {
+FauxtonAPI.registerUrls('allDocs', {
server: function (id, query) {
return app.host + '/' + id + '/_all_docs' + getQueryParam(query);
},
@@ -52,7 +52,7 @@ FauxtonAPI.registerUrls('revision-browser', {
}
});
-FauxtonAPI.registerUrls( 'designDocs', {
+FauxtonAPI.registerUrls('designDocs', {
server: function (id, designDoc) {
return app.host + '/' + id + '/' + designDoc + '/_info';
},
@@ -66,7 +66,7 @@ FauxtonAPI.registerUrls( 'designDocs', {
}
});
-FauxtonAPI.registerUrls( 'view', {
+FauxtonAPI.registerUrls('view', {
server: function (database, designDoc, viewName) {
return app.host + '/' + database + '/_design/' + designDoc + '/_view/' + viewName;
},
@@ -125,7 +125,7 @@ FauxtonAPI.registerUrls('document', {
}
});
-FauxtonAPI.registerUrls( 'new', {
+FauxtonAPI.registerUrls('new', {
newDocument: function (database) {
return '/database/' + database + '/new';
},
@@ -139,7 +139,7 @@ FauxtonAPI.registerUrls( 'new', {
}
});
-FauxtonAPI.registerUrls( 'base', {
+FauxtonAPI.registerUrls('base', {
server: function (database) {
return app.host + '/' + database + '/';
},
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/documents/components/jumptodoc.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/components/jumptodoc.react.jsx b/app/addons/documents/components/jumptodoc.react.jsx
index c40b697..c8398ea 100644
--- a/app/addons/documents/components/jumptodoc.react.jsx
+++ b/app/addons/documents/components/jumptodoc.react.jsx
@@ -26,7 +26,7 @@ const JumpToDoc = ({database, loadOptions}) => {
loadOptions={loadOptions}
clearable={false}
onChange={({value: docId}) => {
- const url = FauxtonAPI.urls('document', 'app', app.utils.safeURLName(database.id), app.utils.safeURLName(docId) );
+ const url = FauxtonAPI.urls('document', 'app', app.utils.safeURLName(database.id), app.utils.safeURLName(docId));
// We navigating away from the page. So we need to take that navigation out of the loop otherwise
// it causes an issue where the react-select state is changed after its unmounted
setTimeout(() => FauxtonAPI.navigate(url, {trigger: true}));
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/documents/index-results/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-results/stores.js b/app/addons/documents/index-results/stores.js
index d36605a..de813e8 100644
--- a/app/addons/documents/index-results/stores.js
+++ b/app/addons/documents/index-results/stores.js
@@ -119,7 +119,7 @@ Stores.IndexResultsStore = FauxtonAPI.Store.extend({
documentsLeftToFetch: function () {
var documentsLeftToFetch = this._docLimit - this.totalDocsViewed();
- if (documentsLeftToFetch < this.getPerPage() ) {
+ if (documentsLeftToFetch < this.getPerPage()) {
return documentsLeftToFetch;
}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/documents/index-results/tests/index-results.storesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-results/tests/index-results.storesSpec.js b/app/addons/documents/index-results/tests/index-results.storesSpec.js
index 5dd9c87..c84f9c9 100644
--- a/app/addons/documents/index-results/tests/index-results.storesSpec.js
+++ b/app/addons/documents/index-results/tests/index-results.storesSpec.js
@@ -726,7 +726,7 @@ describe('Index Pagination', function () {
var testPerPage = 111;
store.setPerPage(testPerPage);
var perPage = window.localStorage.getItem('fauxton:perpage');
- assert.equal(perPage, testPerPage );
+ assert.equal(perPage, testPerPage);
});
it('sets collections perPage', function () {
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 3499ae9..ebd0176 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -59,7 +59,7 @@ Documents.Doc = FauxtonAPI.Model.extend({
},
validate: function (attrs, options) {
- if (this.id && this.id !== attrs._id && this.get('_rev') ) {
+ if (this.id && this.id !== attrs._id && this.get('_rev')) {
return "Cannot change a documents id.";
}
},
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/fauxton/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.react.jsx
index 1ae7be1..741a56f 100644
--- a/app/addons/fauxton/components.react.jsx
+++ b/app/addons/fauxton/components.react.jsx
@@ -64,7 +64,7 @@ var Clipboard = React.createClass({
}.bind(this));
this.clipboard.on('error', function (event) {
- console.log( 'ZeroClipboard error of type "' + event.name + '": ' + event.message );
+ console.log('ZeroClipboard error of type "' + event.name + '": ' + event.message);
});
},
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/replication/base.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/base.js b/app/addons/replication/base.js
index cf8dc69..352d6b0 100644
--- a/app/addons/replication/base.js
+++ b/app/addons/replication/base.js
@@ -18,7 +18,7 @@ replication.initialize = function () {
FauxtonAPI.addHeaderLink({ title: 'Replication', href: '#/replication', icon: 'fonticon-replicate' });
};
-FauxtonAPI.registerUrls( 'replication', {
+FauxtonAPI.registerUrls('replication', {
app: function (db) {
return '#/replication/' + db;
}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/addons/verifyinstall/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js
index a49d2b1..8a432c1 100644
--- a/app/addons/verifyinstall/resources.js
+++ b/app/addons/verifyinstall/resources.js
@@ -137,7 +137,7 @@ Verifyinstall.testProcess = {
promise.then(function () {
var docCount = dbReplicate.get('doc_count');
- if ( docCount === 4) {
+ if (docCount === 4) {
deferred.resolve();
return;
}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/d70343d6/app/core/base.js
----------------------------------------------------------------------
diff --git a/app/core/base.js b/app/core/base.js
index cf3b2dc..999fb2a 100644
--- a/app/core/base.js
+++ b/app/core/base.js
@@ -67,7 +67,7 @@ var caching = {
fetchOnce: function (opt) {
var options = _.extend({}, opt);
- if (!this._deferred || this._deferred.state() === "rejected" || options.forceFetch ) {
+ if (!this._deferred || this._deferred.state() === "rejected" || options.forceFetch) {
this._deferred = this.fetch();
}
[2/5] fauxton commit: updated refs/heads/master to 5be2610
Posted by ro...@apache.org.
upgrade eslint @ 2.x
PR: #734
PR-URL: https://github.com/apache/couchdb-fauxton/pull/734
Reviewed-By: garren smith <ga...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ad2cbecf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ad2cbecf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ad2cbecf
Branch: refs/heads/master
Commit: ad2cbecf5c9de9d0a7f7bfdcd287cd98a25229df
Parents: 968f714
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Tue Jun 21 15:34:35 2016 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Tue Jun 28 16:45:08 2016 +0200
----------------------------------------------------------------------
.eslintrc | 19 +++++++++++--------
package.json | 3 ++-
2 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ad2cbecf/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index d94a612..c344a00 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,10 +1,9 @@
{
"root": true,
- "ecmaFeatures": {
- "jsx": true,
- "modules": true
- },
+ "plugins": [
+ "react"
+ ],
"rules-todo": {
"space-in-parens": 2,
@@ -15,11 +14,8 @@
"rules": {
"semi": [2, "always"],
"no-undef": 2,
- "space-after-keywords": 2,
- "space-before-keywords": 2,
- "space-before-function-paren": 2,
+ "keyword-spacing": 2,
"space-infix-ops": 2,
- "space-return-throw-case": 2,
"space-before-blocks": 2,
"array-bracket-spacing": [2, "never"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
@@ -32,6 +28,13 @@
"no-empty": 2
},
+ "parserOptions": {
+ "sourceType": "module",
+ "ecmaFeatures": {
+ "jsx": true
+ }
+ },
+
"env": {
"browser": true,
"node": true,
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ad2cbecf/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 661f18f..1fba1e0 100644
--- a/package.json
+++ b/package.json
@@ -42,8 +42,9 @@
"couchapp": "~0.11.0",
"css-loader": "^0.23.1",
"d3": "^3.4.11",
- "eslint": "^1.6.0",
+ "eslint": "^2.0.0",
"eslint-loader": "^1.3.0",
+ "eslint-plugin-react": "^5.2.2",
"exports-loader": "^0.6.2",
"expose-loader": "^0.7.1",
"express": "^4.13.4",
[5/5] fauxton commit: updated refs/heads/master to 5be2610
Posted by ro...@apache.org.
move first codemod to codemods folder
PR: #734
PR-URL: https://github.com/apache/couchdb-fauxton/pull/734
Reviewed-By: garren smith <ga...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/5be26108
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/5be26108
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/5be26108
Branch: refs/heads/master
Commit: 5be261085761c5f1d0510f2d28117775ea3e0da2
Parents: d70343d
Author: Robert Kowalski <ro...@apache.org>
Authored: Mon Jun 27 17:07:21 2016 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Tue Jun 28 16:46:01 2016 +0200
----------------------------------------------------------------------
codemods/amd-to-es6-import.md | 9 +++++++++
import.md | 9 ---------
2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5be26108/codemods/amd-to-es6-import.md
----------------------------------------------------------------------
diff --git a/codemods/amd-to-es6-import.md b/codemods/amd-to-es6-import.md
new file mode 100644
index 0000000..5cb447e
--- /dev/null
+++ b/codemods/amd-to-es6-import.md
@@ -0,0 +1,9 @@
+#From `define` to `import`
+
+To run the ast to change a file from using amd to es6 import follow these steps:
+
+* npm i -g jscodeshift
+* npm install 5to6-codemod
+* Replace `./node_modules/5to6-codemod/transforms/amd.js` with https://gist.github.com/robertkowalski/9167d45c0af6b9abdd4b51a09ef4e039
+* run `jscodeshift --extensions=js,jsx -t node_modules/5to6-codemod/transforms/amd.js app/file/name`
+* run git diff to check
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5be26108/import.md
----------------------------------------------------------------------
diff --git a/import.md b/import.md
deleted file mode 100644
index 5cb447e..0000000
--- a/import.md
+++ /dev/null
@@ -1,9 +0,0 @@
-#From `define` to `import`
-
-To run the ast to change a file from using amd to es6 import follow these steps:
-
-* npm i -g jscodeshift
-* npm install 5to6-codemod
-* Replace `./node_modules/5to6-codemod/transforms/amd.js` with https://gist.github.com/robertkowalski/9167d45c0af6b9abdd4b51a09ef4e039
-* run `jscodeshift --extensions=js,jsx -t node_modules/5to6-codemod/transforms/amd.js app/file/name`
-* run git diff to check