Skip to content

Commit 480d048

Browse files
committed
Add 'no-invalid-this' ESLint rule
1 parent b563461 commit 480d048

8 files changed

Lines changed: 8 additions & 2 deletions

File tree

Jakefile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
createDirectoryDependencies(paths.lintDirectories());
7575

7676
rule(".lint", determineLintDependency, function() {
77+
/*eslint no-invalid-this:off */
7778
var lint = require("./build/util/lint_runner.js");
7879
var lintConfig = require("./build/config/eslint.conf.js");
7980

build/config/eslint.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"no-global-assign": ERROR,
5959
"no-implicit-globals": ERROR,
6060
"no-implied-eval": ERROR,
61+
"no-invalid-this": ERROR,
6162
"no-iterator": ERROR,
6263
"no-loop-func": ERROR,
6364
"no-octal": ERROR,

src/_release_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
var assert = require("_assert");
1313

1414
describe("Release", function() {
15+
/*eslint no-invalid-this:off */
1516
this.timeout(10 * 1000);
1617

1718
it("is on web", function(done) {

src/_smoke_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
var driver;
2828

2929
describe("Smoke test", function() {
30+
/*eslint no-invalid-this:off */
3031
this.timeout(30 * 1000);
3132

3233
before(function (done) {

src/client/content/_404_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
var drawSomething;
1919

2020
before(function(done) {
21+
/*eslint no-invalid-this:off */
2122
this.timeout(10 * 1000);
2223
var options = {
2324
src: "/base/src/client/content/404.html",

src/client/content/_index_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
var joinUs;
2222

2323
before(function(done) {
24+
/*eslint no-invalid-this:off */
2425
this.timeout(10 * 1000);
2526
var options = {
2627
src: "/base/src/client/content/index.html",

src/client/ui/html_element.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) 2013-2016 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
22
/*global $, jQuery */
3+
/*eslint no-invalid-this:off */ // event handlers set 'this'
34

45
(function() {
56
"use strict";

todo.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ Engineering Tasks:
6262
- Test that client and server talk to each other correctly; not just that they can talk to Socket.IO, but specifically that they talk to each other
6363

6464
To Do on current task:
65-
- OFF-CAMERA:
65+
- DONE OFF-CAMERA:
6666
- Rename 'Event' to 'Message' across the board
67-
- BEFORE EPISODE:
6867
- Add 'no-invalid-this' linter rule (thanks to Martin Grandrath)
6968
- Look for opportunities to improve Socket.IO abstraction API
7069
- Unify event sending parameters as suggested by Martin Grandrath's in E582 comments - http://www.letscodejavascript.com/v3/comments/live/582#comment-3675682857

0 commit comments

Comments
 (0)