Skip to content

Commit

Permalink
Fix lint errors in xform-dsl
Browse files Browse the repository at this point in the history
This module was previously excluded from linting by mistake!
  • Loading branch information
eyelidlessness committed Sep 18, 2024
1 parent 6070f1f commit 353fce3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/common/src/test/fixtures/xform-dsl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const parseAttributes = (name: string): Map<string, string> => {
const words = name.split(' ');

for (const word of words.slice(1)) {
const parts = word.match(/^(.*)(?<!\\)=(["'].*)/);
const parts = /^(.*)(?<!\\)=(["'].*)/.exec(word);

if (parts == null) {
continue;
Expand Down Expand Up @@ -141,6 +141,7 @@ export const select1 = (ref: string, ...children: XFormsElement[]): XFormsElemen
};

type Select1DynamicParameters =
// eslint-disable-next-line @typescript-eslint/sort-type-constituents
| readonly [ref: string, nodesetRef: string]
| readonly [ref: string, nodesetRef: string, valueRef: string, labelRef: string];

Expand Down Expand Up @@ -224,6 +225,7 @@ export const labelRef = (ref: string) => {
return new TagXFormsElement('label', new Map([['ref', ref]]), []);
}

// eslint-disable-next-line @typescript-eslint/no-shadow
export const item = (value: Int | string, label: string): XFormsElement => {
return t('item', t('label', label), t('value', String(value)));
};
Expand Down

0 comments on commit 353fce3

Please sign in to comment.