style: enable eslint rule @typescript-eslint/member-delimiter-style

pull/566/head
Shahar Or (mightyiam) 5 years ago committed by Shahar Dawn Or
parent 98ed6ffee3
commit 68cbe83dd2

@ -11,7 +11,6 @@ module.exports = {
'@typescript-eslint/consistent-type-assertions': 'off', '@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off', '@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/prefer-optional-chain': 'off', '@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-includes': 'off', '@typescript-eslint/prefer-includes': 'off',

@ -12,14 +12,14 @@ export type RemoveHook = (vNode: VNode, removeCallback: () => void) => any;
export type PostHook = () => any; export type PostHook = () => any;
export interface Hooks { export interface Hooks {
pre?: PreHook; pre?: PreHook
init?: InitHook; init?: InitHook
create?: CreateHook; create?: CreateHook
insert?: InsertHook; insert?: InsertHook
prepatch?: PrePatchHook; prepatch?: PrePatchHook
update?: UpdateHook; update?: UpdateHook
postpatch?: PostPatchHook; postpatch?: PostPatchHook
destroy?: DestroyHook; destroy?: DestroyHook
remove?: RemoveHook; remove?: RemoveHook
post?: PostHook; post?: PostHook
} }

@ -1,19 +1,19 @@
export interface DOMAPI { export interface DOMAPI {
createElement: (tagName: any) => HTMLElement; createElement: (tagName: any) => HTMLElement
createElementNS: (namespaceURI: string, qualifiedName: string) => Element; createElementNS: (namespaceURI: string, qualifiedName: string) => Element
createTextNode: (text: string) => Text; createTextNode: (text: string) => Text
createComment: (text: string) => Comment; createComment: (text: string) => Comment
insertBefore: (parentNode: Node, newNode: Node, referenceNode: Node | null) => void; insertBefore: (parentNode: Node, newNode: Node, referenceNode: Node | null) => void
removeChild: (node: Node, child: Node) => void; removeChild: (node: Node, child: Node) => void
appendChild: (node: Node, child: Node) => void; appendChild: (node: Node, child: Node) => void
parentNode: (node: Node) => Node; parentNode: (node: Node) => Node
nextSibling: (node: Node) => Node; nextSibling: (node: Node) => Node
tagName: (elm: Element) => string; tagName: (elm: Element) => string
setTextContent: (node: Node, text: string | null) => void; setTextContent: (node: Node, text: string | null) => void
getTextContent: (node: Node) => string | null; getTextContent: (node: Node) => string | null
isElement: (node: Node) => node is Element; isElement: (node: Node) => node is Element
isText: (node: Node) => node is Text; isText: (node: Node) => node is Text
isComment: (node: Node) => node is Comment; isComment: (node: Node) => node is Comment
} }
function createElement (tagName: any): HTMLElement { function createElement (tagName: any): HTMLElement {

@ -14,7 +14,7 @@ declare global {
namespace JSX { namespace JSX {
type Element = VNode; type Element = VNode;
interface IntrinsicElements { interface IntrinsicElements {
[elemName: string]: VNodeData; [elemName: string]: VNodeData
} }
} }
} }

@ -4,8 +4,8 @@ import { Module } from './module';
// because those in TypeScript are too restrictive: https://github.com/Microsoft/TSJS-lib-generator/pull/237 // because those in TypeScript are too restrictive: https://github.com/Microsoft/TSJS-lib-generator/pull/237
declare global { declare global {
interface Element { interface Element {
setAttribute(name: string, value: string | number | boolean): void; setAttribute(name: string, value: string | number | boolean): void
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | number | boolean): void; setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | number | boolean): void
} }
} }

@ -1,10 +1,10 @@
import { PreHook, CreateHook, UpdateHook, DestroyHook, RemoveHook, PostHook } from '../hooks'; import { PreHook, CreateHook, UpdateHook, DestroyHook, RemoveHook, PostHook } from '../hooks';
export interface Module { export interface Module {
pre: PreHook; pre: PreHook
create: CreateHook; create: CreateHook
update: UpdateHook; update: UpdateHook
destroy: DestroyHook; destroy: DestroyHook
remove: RemoveHook; remove: RemoveHook
post: PostHook; post: PostHook
} }

@ -2,17 +2,17 @@ import { VNode, VNodeData } from './vnode';
import { h } from './h'; import { h } from './h';
export interface ThunkData extends VNodeData { export interface ThunkData extends VNodeData {
fn: () => VNode; fn: () => VNode
args: any[]; args: any[]
} }
export interface Thunk extends VNode { export interface Thunk extends VNode {
data: ThunkData; data: ThunkData
} }
export interface ThunkFn { export interface ThunkFn {
(sel: string, fn: Function, args: any[]): Thunk; (sel: string, fn: Function, args: any[]): Thunk
(sel: string, key: any, fn: Function, args: any[]): Thunk; (sel: string, key: any, fn: Function, args: any[]): Thunk
} }
function copyToThunk (vnode: VNode, thunk: VNode): void { function copyToThunk (vnode: VNode, thunk: VNode): void {

@ -11,29 +11,29 @@ import { Hero } from './modules/hero';
export type Key = string | number; export type Key = string | number;
export interface VNode { export interface VNode {
sel: string | undefined; sel: string | undefined
data: VNodeData | undefined; data: VNodeData | undefined
children: Array<VNode | string> | undefined; children: Array<VNode | string> | undefined
elm: Node | undefined; elm: Node | undefined
text: string | undefined; text: string | undefined
key: Key | undefined; key: Key | undefined
} }
export interface VNodeData { export interface VNodeData {
props?: Props; props?: Props
attrs?: Attrs; attrs?: Attrs
class?: Classes; class?: Classes
style?: VNodeStyle; style?: VNodeStyle
dataset?: Dataset; dataset?: Dataset
on?: On; on?: On
hero?: Hero; hero?: Hero
attachData?: AttachData; attachData?: AttachData
hook?: Hooks; hook?: Hooks
key?: Key; key?: Key
ns?: string; // for SVGs ns?: string // for SVGs
fn?: () => VNode; // for thunks fn?: () => VNode // for thunks
args?: any[]; // for thunks args?: any[] // for thunks
[key: string]: any; // for any other 3rd party module [key: string]: any // for any other 3rd party module
} }
export function vnode (sel: string | undefined, export function vnode (sel: string | undefined,

Loading…
Cancel
Save