"no-throw-literal": 2, //不允许抛出字面量错误 throw "error" "no-unused-expressions": 2, //不允许无用的表达式 "no-void": 2, //不允许void操作符 "no-warning-comments": [1, {"terms": ["todo", "fixme", "any other term"]}], //不允许警告备注 "no-with": 2, //不允许使用wit...
"no-empty": 2, //不允许出现空的代码块 "no-empty-character-class": 2, //正则表达式中不允许出现空的字符组 "no-ex-assign": 2, //在try catch语句中不允许重新分配异常变量 "no-extra-boolean-cast": 2, //不允许出现不必要的布尔值转换 "no-extra-parens": 0, //不允许出现不必要的圆括号 ...
'no-empty-function':'off','space-before-function-paren': ['off','always'],'no-unreachable-loop':'off','no-multiple-empty-lines':'off','no-loss-of-precision':'off','no-useless-escape':0,semi: ['warn','never'],eqeqeq:0,indent: ['off',2],quotes: ['error','single', {...
vue2常用eslint 'space-before-function-paren': ['error','never'],// 禁止在 function 的左括号之前出现ß空格'no-multiple-empty-lines':2,// 禁止出现多行空行'no-tabs':2,// 禁用 tab'comma-spacing': ['error', {'before':false,'after':true}],// 变量声明,数组文字,对象文字,函数参数和...
'vue/no-unused-vars':['off',{caughtErrors:'none'}],'no-tabs':'off','no-trailing-spaces':'off','no-mixed-spaces-and-tabs':'off','no-empty-function':'off','space-before-function-paren':['off','always'],'no-unreachable-loop':'off','no-multiple-empty-lines':'off','no-loss-...
Therefore we can// "force" the microtask queue to be flushed by adding an empty timer.if(isIOS)setTimeout(noop)}isUsingMicroTask=true}elseif(!isIE&&typeofMutationObserver!=='undefined'&&(isNative(MutationObserver)||// PhantomJS and iOS 7.xMutationObserver.toString()==='[object MutationObserver...
no: 返回false identity: 返回传入的值 genStaticKeys: 生成静态键 looseEqual: 比较两个值是否相等 looseIndexOf: 获取指定值在数组中的索引 once: 保证函数只执行一次 hasChanged: 判断两个值是否不相等 一共是36个函数,下面开始逐个分析。 emptyObject ...
'@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/no-empty-function': 'off', ...
// code/22.Vue2剥丝抽茧-虚拟dom之组件/src/core/vdom/create-element.jsexportfunction_createElement(context,tag,data,children){if(!tag){// in case of component :is set to falsy valuereturncreateEmptyVNode();}if(Array.isArray(data)||isPrimitive(data)){children=data;data=undefined;}children=...
? currentBlock || (EMPTY_ARR as any) : null return vnode } 例子中的render函数执行后返回一个vnode对象,如下,有type,children,dynamicChildren,props等属性 将图中的vnode对象简化一下, { type: "div", props: { class: "block", }, children: [ ...