generated from Seekra/repository-template
style: remove unnecessary function whitespace
Remove the unnecessary whitespace between the function name or the 'function' keyword and the opening parenthesis.
This commit is contained in:
@@ -22,7 +22,7 @@ import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const normalizeSelectedValue = function normalizeSelectedValue (value) {
|
||||
const normalizeSelectedValue = function normalizeSelectedValue(value) {
|
||||
if (props.setting.allowMultiple) {
|
||||
if (Array.isArray(value)) {
|
||||
return value;
|
||||
|
||||
@@ -65,7 +65,7 @@ watch(inputModel, () => {
|
||||
doneButtonInitial.value = false;
|
||||
});
|
||||
|
||||
const apply = function apply () {
|
||||
const apply = function apply() {
|
||||
store.set(props.path, inputModel.value);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -33,7 +33,7 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
const followLink = function followLink () {
|
||||
const followLink = function followLink() {
|
||||
goToSettingsPage(props.target);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -42,7 +42,7 @@ watch(store, (newStore) => {
|
||||
// set value after registering watcher to avoid immediate value change
|
||||
enabled.value = store.get(props.path) ?? props.setting.default;
|
||||
|
||||
const toggle = function toggle () {
|
||||
const toggle = function toggle() {
|
||||
enabled.value = !enabled.value;
|
||||
store.set(props.path, enabled.value);
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ import { useSettingsStore } from '../../stores/settingsStore.js';
|
||||
import { expect, describe, test } from 'vitest';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const getWrapper = function getWrapper ({
|
||||
const getWrapper = function getWrapper({
|
||||
i18n = 'selection',
|
||||
options = [],
|
||||
allowMultiple = false,
|
||||
@@ -43,7 +43,7 @@ const getWrapper = function getWrapper ({
|
||||
}, translations, [], piniaOptions);
|
||||
};
|
||||
|
||||
const getChecked = function getChecked (inputs) {
|
||||
const getChecked = function getChecked(inputs) {
|
||||
return inputs.map((input) => input.element.matches(':checked'));
|
||||
};
|
||||
|
||||
@@ -199,20 +199,20 @@ describe('Selection', () => {
|
||||
});
|
||||
|
||||
test('stores multiple values', async () => {
|
||||
const setValue = async function setValue (input, value) {
|
||||
const setValue = async function setValue(input, value) {
|
||||
input.setValue(value);
|
||||
await nextTick();
|
||||
};
|
||||
|
||||
const check = function check (input) {
|
||||
const check = function check(input) {
|
||||
return setValue(input, true);
|
||||
};
|
||||
|
||||
const uncheck = function uncheck (input) {
|
||||
const uncheck = function uncheck(input) {
|
||||
return setValue(input, false);
|
||||
};
|
||||
|
||||
const expectSelectionValue = function expectSelectionValue (value, options = exampleOptions) {
|
||||
const expectSelectionValue = function expectSelectionValue(value, options = exampleOptions) {
|
||||
value.sort();
|
||||
expect(store.get('selection').sort()).toStrictEqual(value);
|
||||
const checkedInputs = getChecked(inputs);
|
||||
|
||||
@@ -20,7 +20,7 @@ import { useSettingsStore } from '../../stores/settingsStore.js';
|
||||
import { expect, describe, test } from 'vitest';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const getWrapper = function getWrapper ({
|
||||
const getWrapper = function getWrapper({
|
||||
i18n = 'switch1',
|
||||
defaultValue = undefined,
|
||||
translations = {},
|
||||
|
||||
Reference in New Issue
Block a user