mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
refactor: remove eslint ignore rules comments
This commit is contained in:
parent
b229b550f6
commit
cb1fec4c6a
@ -1,14 +1,7 @@
|
||||
/* eslint-disable class-methods-use-this */
|
||||
/* eslint-disable consistent-return */
|
||||
import Emitter from 'tiny-emitter';
|
||||
import listen from 'good-listener';
|
||||
import ClipboardAction from './clipboard-action';
|
||||
|
||||
/**
|
||||
* Base class which takes one or more elements, adds event listeners to them,
|
||||
* and instantiates a new `ClipboardAction` on each click.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Helper function to retrieve attribute value.
|
||||
* @param {String} suffix
|
||||
@ -23,6 +16,11 @@ function getAttributeValue(suffix, element) {
|
||||
|
||||
return element.getAttribute(attribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class which takes one or more elements, adds event listeners to them,
|
||||
* and instantiates a new `ClipboardAction` on each click.
|
||||
*/
|
||||
class Clipboard extends Emitter {
|
||||
/**
|
||||
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
||||
@ -113,7 +111,6 @@ class Clipboard extends Emitter {
|
||||
const actions = typeof action === 'string' ? [action] : action;
|
||||
let support = !!document.queryCommandSupported;
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
actions.forEach((action) => {
|
||||
support = support && !!document.queryCommandSupported(action);
|
||||
});
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import Emitter from 'tiny-emitter';
|
||||
import ClipboardAction from '../src/clipboard-action';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user