workflow: setup eslint for prohibited syntax and globals

fix #1285
This commit is contained in:
Evan You
2020-06-10 16:54:23 -04:00
parent e4dc03a8b1
commit 80c868aefe
20 changed files with 697 additions and 149 deletions

View File

@@ -28,15 +28,7 @@ export const NO = () => false
const onRE = /^on[^a-z]/
export const isOn = (key: string) => onRE.test(key)
export const extend = <T extends object, U extends object>(
a: T,
b: U
): T & U => {
for (const key in b) {
;(a as any)[key] = b[key]
}
return a as any
}
export const extend = Object.assign
export const remove = <T>(arr: T[], el: T) => {
const i = arr.indexOf(el)