eslint: Add key-spacing linter rule.

Apparently, we didn't have one of these, and thus had a moderate
number of generally very old violations in the codebase.  Fix this and
clear the ones that exist..
This commit is contained in:
Tim Abbott 2018-12-18 10:34:45 -08:00
parent 392175d6e8
commit bdb3da4504
45 changed files with 152 additions and 145 deletions

View File

@ -245,6 +245,12 @@
"FunctionExpression": {"parameters": "first"}, "FunctionExpression": {"parameters": "first"},
"FunctionDeclaration": {"parameters": "first"} "FunctionDeclaration": {"parameters": "first"}
}], }],
"key-spacing": [ "error",
{
"beforeColon": false,
"afterColon": true
}
],
"keyword-spacing": [ "error", "keyword-spacing": [ "error",
{ {
"before": true, "before": true,

View File

@ -269,7 +269,8 @@ run_test('last_sent_by_me', () => {
run_test('local_echo', () => { run_test('local_echo', () => {
var list = new MessageList({}); var list = new MessageList({});
list.append([{id:10}, {id:20}, {id:30}, {id:20.02}, {id:20.03}, {id:40}, {id:50}, {id:60}]); list.append([{id: 10}, {id: 20}, {id: 30}, {id: 20.02},
{id: 20.03}, {id: 40}, {id: 50}, {id: 60}]);
list._local_only = {20.02: {id: 20.02}, 20.03: {id: 20.03}}; list._local_only = {20.02: {id: 20.02}, 20.03: {id: 20.03}};
assert.equal(list.closest_id(10), 10); assert.equal(list.closest_id(10), 10);