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-unused-expressions': 'off',
|
||||
'class-methods-use-this': 'off',
|
||||
'max-classes-per-file': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -650,11 +650,9 @@ describe('<lion-fieldset>', () => {
|
|||
|
||||
it('has correct validation afterwards', async () => {
|
||||
const isCat = modelValue => ({ isCat: modelValue === 'cat' });
|
||||
const containsA = modelValues => {
|
||||
return {
|
||||
containsA: modelValues.color ? modelValues.color.indexOf('a') > -1 : false,
|
||||
};
|
||||
};
|
||||
const containsA = modelValues => ({
|
||||
containsA: modelValues.color ? modelValues.color.indexOf('a') > -1 : false,
|
||||
});
|
||||
|
||||
const el = await fixture(html`
|
||||
<${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-email/lion-input-email.js';
|
||||
|
||||
storiesOf('Forms|Form', module).add('Umbrella form', () => {
|
||||
return html`
|
||||
storiesOf('Forms|Form', module).add(
|
||||
'Umbrella form',
|
||||
() => html`
|
||||
<lion-form
|
||||
><form>
|
||||
<lion-input
|
||||
|
|
@ -103,5 +104,5 @@ storiesOf('Forms|Form', module).add('Umbrella form', () => {
|
|||
</div>
|
||||
</form></lion-form
|
||||
>
|
||||
`;
|
||||
});
|
||||
`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@ export class LionInputDate extends FieldCustomMixin(LocalizeMixin(LionInput)) {
|
|||
|
||||
constructor() {
|
||||
super();
|
||||
this.parser = (value, options) => {
|
||||
return value === '' ? undefined : parseDate(value, options);
|
||||
};
|
||||
this.parser = (value, options) => (value === '' ? undefined : parseDate(value, options));
|
||||
this.formatter = formatDate;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import { isValidIBAN } from '@bundled-es-modules/ibantools/ibantools.js';
|
||||
|
||||
export const isIBAN = value => {
|
||||
return isValidIBAN(value);
|
||||
};
|
||||
export const isIBAN = value => isValidIBAN(value);
|
||||
|
||||
export const isIBANValidator = () => [(...params) => ({ isIBAN: isIBAN(...params) })];
|
||||
|
||||
|
|
|
|||
|
|
@ -89,9 +89,7 @@ export class LionSelectRich extends FormRegistrarMixin(
|
|||
get slots() {
|
||||
return {
|
||||
...super.slots,
|
||||
invoker: () => {
|
||||
return document.createElement('lion-select-invoker');
|
||||
},
|
||||
invoker: () => document.createElement('lion-select-invoker'),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,7 @@ function rewriteLinksInMdContent(mdContent, filePath, cfg = rewriteLinksConfig)
|
|||
return newHref;
|
||||
};
|
||||
|
||||
const mdLink = (href, title, text) => {
|
||||
return `[${text}](${rewrite(href)}${title ? ` ${title}` : ''})`;
|
||||
};
|
||||
const mdLink = (href, title, text) => `[${text}](${rewrite(href)}${title ? ` ${title}` : ''})`;
|
||||
|
||||
const resultLinks = [];
|
||||
// /^!?\[(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*}'
|
||||
const packagePattern = '*';
|
||||
|
||||
const replaceAll = (str, oldValue, newValue) => {
|
||||
return str.split(oldValue).join(newValue);
|
||||
};
|
||||
const replaceAll = (str, oldValue, newValue) => str.split(oldValue).join(newValue);
|
||||
|
||||
const countOccurences = (str, subbstr) => {
|
||||
return str.split(subbstr).length - 1;
|
||||
};
|
||||
const countOccurences = (str, subbstr) => str.split(subbstr).length - 1;
|
||||
|
||||
const makeLionImportsRelative = file => {
|
||||
// example:
|
||||
|
|
|
|||
Loading…
Reference in a new issue