Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit db0d74d

Browse files
committed
Remove a couple more files from eslintignore
Just var/const & spaces
1 parent 7ec1d5a commit db0d74d

File tree

3 files changed

+24
-32
lines changed

3 files changed

+24
-32
lines changed

.eslintignore.errorfiles

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ src/utils/MultiInviter.js
1212
test/components/structures/MessagePanel-test.js
1313
test/components/views/dialogs/InteractiveAuthDialog-test.js
1414
test/mock-clock.js
15-
test/notifications/ContentRules-test.js
16-
test/notifications/PushRuleVectorState-test.js
1715
src/component-index.js
1816
test/end-to-end-tests/node_modules/
1917
test/end-to-end-tests/riot/

test/notifications/ContentRules-test.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
var notifications = require('../../src/notifications');
17+
const notifications = require('../../src/notifications');
1818

19-
var ContentRules = notifications.ContentRules;
20-
var PushRuleVectorState = notifications.PushRuleVectorState;
19+
const ContentRules = notifications.ContentRules;
20+
const PushRuleVectorState = notifications.PushRuleVectorState;
2121

22-
var expect = require('expect');
23-
var test_utils = require('../test-utils');
24-
25-
var NORMAL_RULE = {
22+
const NORMAL_RULE = {
2623
actions: [
2724
"notify",
2825
{ set_tweak: "highlight", value: false },
@@ -32,7 +29,7 @@ var NORMAL_RULE = {
3229
rule_id: "vdh2",
3330
};
3431

35-
var LOUD_RULE = {
32+
const LOUD_RULE = {
3633
actions: [
3734
"notify",
3835
{ set_tweak: "highlight" },
@@ -43,7 +40,7 @@ var LOUD_RULE = {
4340
rule_id: "vdh2",
4441
};
4542

46-
var USERNAME_RULE = {
43+
const USERNAME_RULE = {
4744
actions: [
4845
"notify",
4946
{ set_tweak: "sound", value: "default" },
@@ -56,53 +53,52 @@ var USERNAME_RULE = {
5653
};
5754

5855

59-
6056
describe("ContentRules", function() {
6157
describe("parseContentRules", function() {
6258
it("should handle there being no keyword rules", function() {
63-
var rules = { 'global': { 'content': [
59+
const rules = { 'global': { 'content': [
6460
USERNAME_RULE,
6561
]}};
66-
var parsed = ContentRules.parseContentRules(rules);
62+
const parsed = ContentRules.parseContentRules(rules);
6763
expect(parsed.rules).toEqual([]);
6864
expect(parsed.vectorState).toEqual(PushRuleVectorState.ON);
6965
expect(parsed.externalRules).toEqual([]);
7066
});
7167

7268
it("should parse regular keyword notifications", function() {
73-
var rules = { 'global': { 'content': [
69+
const rules = { 'global': { 'content': [
7470
NORMAL_RULE,
7571
USERNAME_RULE,
7672
]}};
7773

78-
var parsed = ContentRules.parseContentRules(rules);
74+
const parsed = ContentRules.parseContentRules(rules);
7975
expect(parsed.rules.length).toEqual(1);
8076
expect(parsed.rules[0]).toEqual(NORMAL_RULE);
8177
expect(parsed.vectorState).toEqual(PushRuleVectorState.ON);
8278
expect(parsed.externalRules).toEqual([]);
8379
});
8480

8581
it("should parse loud keyword notifications", function() {
86-
var rules = { 'global': { 'content': [
82+
const rules = { 'global': { 'content': [
8783
LOUD_RULE,
8884
USERNAME_RULE,
8985
]}};
9086

91-
var parsed = ContentRules.parseContentRules(rules);
87+
const parsed = ContentRules.parseContentRules(rules);
9288
expect(parsed.rules.length).toEqual(1);
9389
expect(parsed.rules[0]).toEqual(LOUD_RULE);
9490
expect(parsed.vectorState).toEqual(PushRuleVectorState.LOUD);
9591
expect(parsed.externalRules).toEqual([]);
9692
});
9793

9894
it("should parse mixed keyword notifications", function() {
99-
var rules = { 'global': { 'content': [
95+
const rules = { 'global': { 'content': [
10096
LOUD_RULE,
10197
NORMAL_RULE,
10298
USERNAME_RULE,
10399
]}};
104100

105-
var parsed = ContentRules.parseContentRules(rules);
101+
const parsed = ContentRules.parseContentRules(rules);
106102
expect(parsed.rules.length).toEqual(1);
107103
expect(parsed.rules[0]).toEqual(LOUD_RULE);
108104
expect(parsed.vectorState).toEqual(PushRuleVectorState.LOUD);

test/notifications/PushRuleVectorState-test.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
var notifications = require('../../src/notifications');
17+
const notifications = require('../../src/notifications');
1818

19-
var prvs = notifications.PushRuleVectorState;
20-
21-
var expect = require('expect');
19+
const prvs = notifications.PushRuleVectorState;
2220

2321
describe("PushRuleVectorState", function() {
2422
describe("contentRuleVectorStateKind", function() {
25-
it("should understand normal notifications", function () {
26-
var rule = {
23+
it("should understand normal notifications", function() {
24+
const rule = {
2725
actions: [
2826
"notify",
2927
],
@@ -33,26 +31,26 @@ describe("PushRuleVectorState", function() {
3331
toEqual(prvs.ON);
3432
});
3533

36-
it("should handle loud notifications", function () {
37-
var rule = {
34+
it("should handle loud notifications", function() {
35+
const rule = {
3836
actions: [
3937
"notify",
4038
{ set_tweak: "highlight", value: true },
4139
{ set_tweak: "sound", value: "default" },
42-
]
40+
],
4341
};
4442

4543
expect(prvs.contentRuleVectorStateKind(rule)).
4644
toEqual(prvs.LOUD);
4745
});
4846

49-
it("should understand missing highlight.value", function () {
50-
var rule = {
47+
it("should understand missing highlight.value", function() {
48+
const rule = {
5149
actions: [
5250
"notify",
5351
{ set_tweak: "highlight" },
5452
{ set_tweak: "sound", value: "default" },
55-
]
53+
],
5654
};
5755

5856
expect(prvs.contentRuleVectorStateKind(rule)).

0 commit comments

Comments
 (0)