[Pkg-javascript-commits] [backbone] 100/173: Add ESLint rule: dot-notation
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 07:44:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository backbone.
commit 89d50840b63836ba37aef9b718df9c410439b71a
Author: Jordan Eldredge <jordan at jordaneldredge.com>
Date: Mon Dec 28 21:09:44 2015 -0800
Add ESLint rule: dot-notation
---
.eslintrc | 1 +
test/events.js | 2 +-
test/model.js | 2 +-
test/sync.js | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.eslintrc b/.eslintrc
index ad16a76..a9a7279 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -16,6 +16,7 @@
"comma-dangle": [2, "never"],
"comma-spacing": 2,
"computed-property-spacing": [2, "never"],
+ "dot-notation": [2, { "allowKeywords": false }],
"eol-last": 2,
"indent": [2, 2, {"SwitchCase": 1, "VariableDeclarator": 2}],
"key-spacing": 1,
diff --git a/test/events.js b/test/events.js
index ffcdde6..cd259ea 100644
--- a/test/events.js
+++ b/test/events.js
@@ -477,7 +477,7 @@
QUnit.test('if callback is truthy but not a function, `on` should throw an error just like jQuery', function(assert) {
assert.expect(1);
var view = _.extend({}, Backbone.Events).on('test', 'noop');
- assert.throws(function() {
+ assert.raises(function() {
view.trigger('test');
});
});
diff --git a/test/model.js b/test/model.js
index b843aff..2e5c24e 100644
--- a/test/model.js
+++ b/test/model.js
@@ -89,7 +89,7 @@
doc.collection.url = '/collection/';
assert.equal(doc.url(), '/collection/1-the-tempest');
doc.collection = null;
- assert.throws(function() { doc.url(); });
+ assert.raises(function() { doc.url(); });
doc.collection = collection;
});
diff --git a/test/sync.js b/test/sync.js
index 7ae82a0..b176bec 100644
--- a/test/sync.js
+++ b/test/sync.js
@@ -142,7 +142,7 @@
QUnit.test('urlError', function(assert) {
assert.expect(2);
var model = new Backbone.Model();
- assert.throws(function() {
+ assert.raises(function() {
model.fetch();
});
model.fetch({url: '/one/two'});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list