aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/profile-conditions-ui.js
diff options
context:
space:
mode:
authorJames Maa <jmaa@berkeley.edu>2024-05-31 08:06:52 -0700
committerGitHub <noreply@github.com>2024-05-31 15:06:52 +0000
commit76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 (patch)
treebdba43d9ba704885383c7f308c6fe3f574c647c5 /ext/js/pages/settings/profile-conditions-ui.js
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/pages/settings/profile-conditions-ui.js')
-rw-r--r--ext/js/pages/settings/profile-conditions-ui.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/ext/js/pages/settings/profile-conditions-ui.js b/ext/js/pages/settings/profile-conditions-ui.js
index 8f53232a..0d562e5c 100644
--- a/ext/js/pages/settings/profile-conditions-ui.js
+++ b/ext/js/pages/settings/profile-conditions-ui.js
@@ -65,9 +65,9 @@ export class ProfileConditionsUI extends EventDispatcher {
['lessThan', {displayName: '<', type: 'integer', defaultValue: '0', validate: validateInteger, normalize: normalizeInteger}],
['greaterThan', {displayName: '>', type: 'integer', defaultValue: '0', validate: validateInteger, normalize: normalizeInteger}],
['lessThanOrEqual', {displayName: '\u2264', type: 'integer', defaultValue: '0', validate: validateInteger, normalize: normalizeInteger}],
- ['greaterThanOrEqual', {displayName: '\u2265', type: 'integer', defaultValue: '0', validate: validateInteger, normalize: normalizeInteger}]
- ])
- }
+ ['greaterThanOrEqual', {displayName: '\u2265', type: 'integer', defaultValue: '0', validate: validateInteger, normalize: normalizeInteger}],
+ ]),
+ },
],
[
'url',
@@ -76,9 +76,9 @@ export class ProfileConditionsUI extends EventDispatcher {
defaultOperator: 'matchDomain',
operators: new Map([
['matchDomain', {displayName: 'Matches Domain', type: 'string', defaultValue: 'example.com', resetDefaultOnChange: true, validate: this._validateDomains.bind(this), normalize: this._normalizeDomains.bind(this)}],
- ['matchRegExp', {displayName: 'Matches RegExp', type: 'string', defaultValue: 'example\\.com', resetDefaultOnChange: true, validate: this._validateRegExp.bind(this)}]
- ])
- }
+ ['matchRegExp', {displayName: 'Matches RegExp', type: 'string', defaultValue: 'example\\.com', resetDefaultOnChange: true, validate: this._validateRegExp.bind(this)}],
+ ]),
+ },
],
[
'modifierKeys',
@@ -89,9 +89,9 @@ export class ProfileConditionsUI extends EventDispatcher {
['are', {displayName: 'Are', type: 'modifierKeys', defaultValue: ''}],
['areNot', {displayName: 'Are Not', type: 'modifierKeys', defaultValue: ''}],
['include', {displayName: 'Include', type: 'modifierKeys', defaultValue: ''}],
- ['notInclude', {displayName: 'Don\'t Include', type: 'modifierKeys', defaultValue: ''}]
- ])
- }
+ ['notInclude', {displayName: 'Don\'t Include', type: 'modifierKeys', defaultValue: ''}],
+ ]),
+ },
],
[
'flags',
@@ -102,15 +102,15 @@ export class ProfileConditionsUI extends EventDispatcher {
['are', {displayName: 'Are', type: 'string', defaultValue: '', validate: validateFlags, normalize: normalizeFlags}],
['areNot', {displayName: 'Are Not', type: 'string', defaultValue: '', validate: validateFlags, normalize: normalizeFlags}],
['include', {displayName: 'Include', type: 'string', defaultValue: '', validate: validateFlags, normalize: normalizeFlags}],
- ['notInclude', {displayName: 'Don\'t Include', type: 'string', defaultValue: '', validate: validateFlags, normalize: normalizeFlags}]
- ])
- }
- ]
+ ['notInclude', {displayName: 'Don\'t Include', type: 'string', defaultValue: '', validate: validateFlags, normalize: normalizeFlags}],
+ ]),
+ },
+ ],
]);
/* eslint-enable @stylistic/no-multi-spaces */
/** @type {Set<string>} */
this._validFlags = new Set([
- 'clipboard'
+ 'clipboard',
]);
}
@@ -225,7 +225,7 @@ export class ProfileConditionsUI extends EventDispatcher {
defaultValue = '',
resetDefaultOnChange = false,
validate = null,
- normalize = null
+ normalize = null,
} = (typeof info === 'undefined' ? {} : info);
return {
@@ -234,7 +234,7 @@ export class ProfileConditionsUI extends EventDispatcher {
defaultValue,
resetDefaultOnChange,
validate,
- normalize
+ normalize,
};
}
@@ -271,7 +271,7 @@ export class ProfileConditionsUI extends EventDispatcher {
path: this.getPath('conditionGroups'),
start: index,
deleteCount: 1,
- items: []
+ items: [],
}]);
this._triggerConditionGroupCountChanged(this._children.length);
@@ -327,7 +327,7 @@ export class ProfileConditionsUI extends EventDispatcher {
_onAddConditionGroupButtonClick() {
/** @type {import('settings').ProfileConditionGroup} */
const conditionGroup = {
- conditions: [this.getDefaultCondition()]
+ conditions: [this.getDefaultCondition()],
};
const index = this._children.length;
@@ -338,7 +338,7 @@ export class ProfileConditionsUI extends EventDispatcher {
path: this.getPath('conditionGroups'),
start: index,
deleteCount: 0,
- items: [conditionGroup]
+ items: [conditionGroup],
}]);
this._triggerConditionGroupCountChanged(this._children.length);
@@ -548,7 +548,7 @@ class ProfileConditionGroupUI {
path: this.getPath('conditions'),
start: index,
deleteCount: 1,
- items: []
+ items: [],
}]);
if (this._children.length === 0) {
@@ -586,7 +586,7 @@ class ProfileConditionGroupUI {
path: this.getPath('conditions'),
start: index,
deleteCount: 0,
- items: [condition]
+ items: [condition],
}]);
}
@@ -971,7 +971,7 @@ class ProfileConditionUI {
await this.settingsController.modifyGlobalSettings([
{action: 'set', path: this.getPath('type'), value: type},
{action: 'set', path: this.getPath('operator'), value: operator},
- {action: 'set', path: this.getPath('value'), value: defaultValue}
+ {action: 'set', path: this.getPath('value'), value: defaultValue},
]);
}