style: enable eslint rule no-unused-vars

pull/566/head
Shahar Or (mightyiam) 5 years ago committed by Shahar Dawn Or
parent 967c016dd1
commit b0ec1a7bfd

@ -16,7 +16,6 @@ module.exports = {
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-dynamic-delete': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
@ -24,7 +23,6 @@ module.exports = {
'comma-dangle': ['error', 'only-multiline'],
'no-mixed-operators': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
eqeqeq: 'off',
'@typescript-eslint/semi': ['error', 'always'],
semi: ['error', 'always'],

@ -4,8 +4,6 @@ var patch = snabbdom.init([
]);
var h = require('../../h.js').default;
var vnode;
window.addEventListener('DOMContentLoaded', () => {
var container = document.getElementById('container');
var vnode = h('div', [
@ -13,5 +11,5 @@ window.addEventListener('DOMContentLoaded', () => {
h('circle', { attrs: { cx: 50, cy: 50, r: 40, stroke: 'green', 'stroke-width': 4, fill: 'yellow' } })
])
]);
vnode = patch(container, vnode);
patch(container, vnode);
});

@ -1,4 +1,9 @@
import { VNode, VNodeData } from './vnode';
import { VNode as _VNode, VNodeData as _VNodeData } from './vnode';
// workaround
// https://github.com/typescript-eslint/typescript-eslint/issues/1596
type VNode = _VNode;
type VNodeData = _VNodeData;
declare global {
/**

@ -1,4 +1,3 @@
/* global module, document, Node */
import { Module } from './modules/module';
import vnode, { VNode } from './vnode';
import * as is from './is';

@ -1,4 +1,6 @@
import { assert } from 'chai';
// workaround linter issue
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jsx } from '../jsx';
describe('snabbdom', function () {
@ -182,6 +184,8 @@ describe('snabbdom', function () {
});
it('works with a function component', function () {
// workaround linter issue
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Part = ({ part }: {part: string}) => <span>{part}</span>;
const vnode = (
<div>

Loading…
Cancel
Save