chore: update linting
This commit is contained in:
parent
b7b8138fe7
commit
a8ead53310
8 changed files with 15 additions and 27 deletions
|
|
@ -20,6 +20,7 @@ module.exports = {
|
||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
'no-unused-expressions': 'off',
|
'no-unused-expressions': 'off',
|
||||||
'class-methods-use-this': 'off',
|
'class-methods-use-this': 'off',
|
||||||
|
'max-classes-per-file': 'off',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -650,11 +650,9 @@ describe('<lion-fieldset>', () => {
|
||||||
|
|
||||||
it('has correct validation afterwards', async () => {
|
it('has correct validation afterwards', async () => {
|
||||||
const isCat = modelValue => ({ isCat: modelValue === 'cat' });
|
const isCat = modelValue => ({ isCat: modelValue === 'cat' });
|
||||||
const containsA = modelValues => {
|
const containsA = modelValues => ({
|
||||||
return {
|
containsA: modelValues.color ? modelValues.color.indexOf('a') > -1 : false,
|
||||||
containsA: modelValues.color ? modelValues.color.indexOf('a') > -1 : false,
|
});
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const el = await fixture(html`
|
const el = await fixture(html`
|
||||||
<${tag} .errorValidators=${[[containsA]]}>
|
<${tag} .errorValidators=${[[containsA]]}>
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@ import '@lion/input-amount/lion-input-amount.js';
|
||||||
import '@lion/input-date/lion-input-date.js';
|
import '@lion/input-date/lion-input-date.js';
|
||||||
import '@lion/input-email/lion-input-email.js';
|
import '@lion/input-email/lion-input-email.js';
|
||||||
|
|
||||||
storiesOf('Forms|Form', module).add('Umbrella form', () => {
|
storiesOf('Forms|Form', module).add(
|
||||||
return html`
|
'Umbrella form',
|
||||||
|
() => html`
|
||||||
<lion-form
|
<lion-form
|
||||||
><form>
|
><form>
|
||||||
<lion-input
|
<lion-input
|
||||||
|
|
@ -103,5 +104,5 @@ storiesOf('Forms|Form', module).add('Umbrella form', () => {
|
||||||
</div>
|
</div>
|
||||||
</form></lion-form
|
</form></lion-form
|
||||||
>
|
>
|
||||||
`;
|
`,
|
||||||
});
|
);
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,7 @@ export class LionInputDate extends FieldCustomMixin(LocalizeMixin(LionInput)) {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.parser = (value, options) => {
|
this.parser = (value, options) => (value === '' ? undefined : parseDate(value, options));
|
||||||
return value === '' ? undefined : parseDate(value, options);
|
|
||||||
};
|
|
||||||
this.formatter = formatDate;
|
this.formatter = formatDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import { isValidIBAN } from '@bundled-es-modules/ibantools/ibantools.js';
|
import { isValidIBAN } from '@bundled-es-modules/ibantools/ibantools.js';
|
||||||
|
|
||||||
export const isIBAN = value => {
|
export const isIBAN = value => isValidIBAN(value);
|
||||||
return isValidIBAN(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isIBANValidator = () => [(...params) => ({ isIBAN: isIBAN(...params) })];
|
export const isIBANValidator = () => [(...params) => ({ isIBAN: isIBAN(...params) })];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,7 @@ export class LionSelectRich extends FormRegistrarMixin(
|
||||||
get slots() {
|
get slots() {
|
||||||
return {
|
return {
|
||||||
...super.slots,
|
...super.slots,
|
||||||
invoker: () => {
|
invoker: () => document.createElement('lion-select-invoker'),
|
||||||
return document.createElement('lion-select-invoker');
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,7 @@ function rewriteLinksInMdContent(mdContent, filePath, cfg = rewriteLinksConfig)
|
||||||
return newHref;
|
return newHref;
|
||||||
};
|
};
|
||||||
|
|
||||||
const mdLink = (href, title, text) => {
|
const mdLink = (href, title, text) => `[${text}](${rewrite(href)}${title ? ` ${title}` : ''})`;
|
||||||
return `[${text}](${rewrite(href)}${title ? ` ${title}` : ''})`;
|
|
||||||
};
|
|
||||||
|
|
||||||
const resultLinks = [];
|
const resultLinks = [];
|
||||||
// /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/
|
// /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,9 @@ const wallabyWebpack = require('wallaby-webpack'); // eslint-disable-line import
|
||||||
// filter packages, e.g. 'core' / '{radio,radio-button}' / '{form,input*}'
|
// filter packages, e.g. 'core' / '{radio,radio-button}' / '{form,input*}'
|
||||||
const packagePattern = '*';
|
const packagePattern = '*';
|
||||||
|
|
||||||
const replaceAll = (str, oldValue, newValue) => {
|
const replaceAll = (str, oldValue, newValue) => str.split(oldValue).join(newValue);
|
||||||
return str.split(oldValue).join(newValue);
|
|
||||||
};
|
|
||||||
|
|
||||||
const countOccurences = (str, subbstr) => {
|
const countOccurences = (str, subbstr) => str.split(subbstr).length - 1;
|
||||||
return str.split(subbstr).length - 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
const makeLionImportsRelative = file => {
|
const makeLionImportsRelative = file => {
|
||||||
// example:
|
// example:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue