rework eslint config (#11615)
* rework eslint config - use explicit config that only enables rules - upgrade eslint to 7.1.0 - add new plugins with selected rules enabled - fix discovered issues, remove global wipPrefixes * remove if * undo template change * add disabled rules as well for easier config updating * add missing disabled rule * update eslint and plugins * fix new violation * remove deprecated rules Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
363e51d19c
commit
19db3f4f0a
8 changed files with 725 additions and 163 deletions
|
@ -7,17 +7,16 @@ export default async function initClipboard() {
|
|||
const clipboard = new ClipboardJS(els);
|
||||
clipboard.on('success', (e) => {
|
||||
e.clearSelection();
|
||||
|
||||
$(`#${e.trigger.getAttribute('id')}`).popup('destroy');
|
||||
e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success'));
|
||||
$(`#${e.trigger.getAttribute('id')}`).popup('show');
|
||||
e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));
|
||||
$(e.trigger).popup('destroy');
|
||||
e.trigger.dataset.content = e.trigger.dataset.success;
|
||||
$(e.trigger).popup('show');
|
||||
e.trigger.dataset.content = e.trigger.dataset.original;
|
||||
});
|
||||
|
||||
clipboard.on('error', (e) => {
|
||||
$(`#${e.trigger.getAttribute('id')}`).popup('destroy');
|
||||
e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error'));
|
||||
$(`#${e.trigger.getAttribute('id')}`).popup('show');
|
||||
e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));
|
||||
$(e.trigger).popup('destroy');
|
||||
e.trigger.dataset.content = e.trigger.dataset.error;
|
||||
$(e.trigger).popup('show');
|
||||
e.trigger.dataset.content = e.trigger.dataset.original;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue