diff --git a/.eslintrc.js b/.eslintrc.js index b1f96769da..d8d2e468ad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,5 +21,6 @@ module.exports = { allow: ['warn', 'error', 'info', 'debug'], }, ], + 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], }, }; diff --git a/blocks/product-details-custom/Icon.js b/blocks/product-details-custom/Icon.js deleted file mode 100644 index 4506b6a18c..0000000000 --- a/blocks/product-details-custom/Icon.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - h, Component, Fragment, - // eslint-disable-next-line import/no-unresolved,import/extensions -} from '../../scripts/preact.js'; -// eslint-disable-next-line import/no-unresolved,import/extensions -import htm from '../../scripts/htm.js'; - -const html = htm.bind(h); - -export default class Icon extends Component { - constructor(props) { - super(); - - this.iconName = props.name; - } - - async componentDidMount() { - const resp = await fetch(`${window.hlx.codeBasePath}/icons/${this.iconName}.svg`); - if (resp.ok) { - const iconHTML = await resp.text(); - this.setState({ iconHTML }); - } - } - - render() { - if (!this.state.iconHTML) { - return null; - } - - if (this.state.iconHTML.match(/