style: four eslint rules enabled (#548)

- import/newline-after-import
- dot-notation
- import/first
- no-undef
pull/553/head
Shahar Dawn Or 5 years ago committed by GitHub
parent 9f55486f42
commit 814c2e50d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@ module.exports = {
'/dist/'
],
rules: {
'import/newline-after-import': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
@ -16,10 +17,7 @@ module.exports = {
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'comma-dangle': 'off',
'dot-notation': 'off',
'import/first': 'off',
'no-mixed-operators': 'off',
'no-undef': 'off',
'no-unneeded-ternary': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',

@ -1,3 +1,5 @@
// Has not been maintained for a while.
/* eslint-disable */
var Benchmark = require('benchmark');
var a = require('../snabbdom.js');
var b = require('../oldsnabbdom.js');

@ -1,9 +1,10 @@
import { vnode, VNode, VNodeData } from './vnode';
import * as is from './is';
export type VNodes = VNode[];
export type VNodeChildElement = VNode | string | number | undefined | null;
export type ArrayOrElement<T> = T | T[];
export type VNodeChildren = ArrayOrElement<VNodeChildElement>
import * as is from './is';
function addNS (data: any, children: VNodes | undefined, sel: string | undefined): void {
data.ns = 'http://www.w3.org/2000/svg';

@ -4,7 +4,10 @@ import { classModule } from './modules/class'; // makes it easy to toggle classe
import { propsModule } from './modules/props'; // for setting properties on DOM elements
import { styleModule } from './modules/style'; // handles styling on elements with support for animations
import { eventListenersModule } from './modules/eventlisteners'; // attaches event listeners
import { h } from './h'; // helper function for creating vnodes
// helper function for creating vnodes
import { h } from './h';
var patch = init([ // Init patch function with choosen modules
attributesModule,
classModule,

@ -1,11 +1,11 @@
import assert from 'assert'
import { init } from '../snabbdom'
import { RemoveHook } from '../hooks';
var patch = init([]);
import attachTo from '../helpers/attachto'
import h from '../h'
var patch = init([]);
describe('attachTo', function () {
var elm: any, vnode0: any;
beforeEach(function () {

@ -1,10 +1,11 @@
import assert from 'assert'
import { init } from '../snabbdom'
import attributesModule from '../modules/attributes'
import h from '../h'
var patch = init([
attributesModule
]);
import h from '../h'
describe('attributes', function () {
var elm: any, vnode0: any;

@ -5,17 +5,18 @@ import { init } from '../snabbdom'
import classModule from '../modules/class'
import propsModule from '../modules/props'
import eventListenersModule from '../modules/eventlisteners'
var patch = init([
classModule,
propsModule,
eventListenersModule
]);
import h from '../h'
import toVNode from '../tovnode'
import vnode, { VNode } from '../vnode'
import htmlDomApi from '../htmldomapi'
import { CreateHook, InsertHook, PrePatchHook, RemoveHook, InitHook, DestroyHook, UpdateHook } from '../hooks'
var patch = init([
classModule,
propsModule,
eventListenersModule
]);
function prop<T> (name: string) {
return function (obj: {[index: string]: T}) {
return obj[name];

@ -2,10 +2,11 @@ import assert from 'assert'
import datasetModule from '../modules/dataset'
import { init } from '../snabbdom'
import h from '../h'
var patch = init([
datasetModule
]);
import h from '../h'
describe('dataset', function () {
var elm: any, vnode0: any;

@ -3,10 +3,11 @@ import { VNode } from '../vnode';
import { init } from '../snabbdom'
import eventListenersModule from '../modules/eventlisteners'
import h from '../h'
var patch = init([
eventListenersModule
]);
import h from '../h'
describe('event listeners', function () {
var elm: any, vnode0: any;

@ -3,6 +3,7 @@ import assert from 'assert'
import { init } from '../snabbdom'
import h from '../h'
import attributesModule from '../modules/attributes'
var patch = init([
attributesModule
]);

@ -2,11 +2,12 @@ import assert from 'assert'
import { init } from '../snabbdom'
import styleModule from '../modules/style'
import h from '../h'
import toVNode from '../tovnode'
var patch = init([
styleModule
]);
import h from '../h'
import toVNode from '../tovnode'
describe('style', function () {
var elm: any, vnode0: any;

@ -1,12 +1,13 @@
import assert from 'assert'
import { init } from '../snabbdom'
var patch = init([
]);
import h from '../h'
import thunk from '../thunk'
import { VNode } from '../vnode';
var patch = init([
]);
describe('thunk', function () {
var elm: any, vnode0: any;
beforeEach(function () {

Loading…
Cancel
Save