feat:add eslint and fix

This commit is contained in:
黄云飞
2022-03-22 14:48:10 +08:00
parent 764fd8bbad
commit c49b7b5978
59 changed files with 1117 additions and 317 deletions
+40 -40
View File
@@ -7,48 +7,48 @@ interface IPrismKindStyle {
export function getPrismKindStyle(payload: string): IPrismKindStyle | null {
switch (payload) {
case "comment":
case "prolog":
case "doctype":
case "cdata":
return { color: "#008000", italic: true }
case "namespace":
case 'comment':
case 'prolog':
case 'doctype':
case 'cdata':
return { color: '#008000', italic: true }
case 'namespace':
return { opacity: 0.7 }
case "string":
return { color: "#A31515" }
case "punctuation":
case "operator":
return { color: "#393A34" }
case "url":
case "symbol":
case "number":
case "boolean":
case "variable":
case "constant":
case "inserted":
return { color: "#36acaa" }
case "atrule":
case "keyword":
case "attr-value":
return { color: "#0000ff" }
case "function":
return { color: "#b9a40a" }
case "deleted":
case "tag":
return { color: "#9a050f" }
case "selector":
return { color: "#00009f" }
case "important":
return { color: "#e90", bold: true }
case "italic":
case 'string':
return { color: '#A31515' }
case 'punctuation':
case 'operator':
return { color: '#393A34' }
case 'url':
case 'symbol':
case 'number':
case 'boolean':
case 'variable':
case 'constant':
case 'inserted':
return { color: '#36acaa' }
case 'atrule':
case 'keyword':
case 'attr-value':
return { color: '#0000ff' }
case 'function':
return { color: '#b9a40a' }
case 'deleted':
case 'tag':
return { color: '#9a050f' }
case 'selector':
return { color: '#00009f' }
case 'important':
return { color: '#e90', bold: true }
case 'italic':
return { italic: true }
case "class-name":
case "property":
return { color: "#2B91AF" }
case "attr-name":
case "regex":
case "entity":
return { color: "#ff0000" }
case 'class-name':
case 'property':
return { color: '#2B91AF' }
case 'attr-name':
case 'regex':
case 'entity':
return { color: '#ff0000' }
default:
return null
}