- 安装 sublimelinter
- 安装 sublimelinter-eslint # 重启 sublime
- 用户设置 SublimeLinter.sublime-settings
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
<?php | |
trait MethodInvoker { | |
/** | |
* Call protected/private static method of a class. | |
* | |
* @param string $class - class name that we will run method on | |
* @param string $methodName - method name to call | |
* @param array $parameter - parameter to pass into method | |
* | |
* @return mixed - original method's return |
(function () { | |
'use strict'; | |
angular | |
.module('q.race', []) | |
.config(function ($provide) { | |
$provide.decorator('$q', function ($delegate) { | |
$delegate.race = promises => $delegate((resolve, reject) => { | |
const bind = promise => { |
/** | |
* 将字符串编译为 DOM 结构 | |
* @deprecated 请注意,不要用该函数,因为 compile('<div></div><p></p>') 会编译成嵌套结构:<p><div></div></p> | |
* @public | |
* @param {String} domString | |
* @return {HTMLElement} | |
* @throws {Error} 如果输入不是合法的 DOM 字符串 | |
* | |
* @example | |
* compile('<div><p><a><em></em></a></p></div>') |
export interface IPackageJSON extends Object { | |
readonly name: string; | |
readonly version?: string; | |
readonly description?: string; | |
readonly keywords?: string[]; |
# ---------------------------------- | |
# Colors | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
CYAN='\033[0;36m' |
/** | |
* Transform HTML `table` element to JS Object. | |
* @param {HTMLTableElement} table | |
* @returns {{ caption: string; rows: Array<{ [key: string]: string }>; }} | |
*/ | |
function table2JSObject(table) { | |
const caption = table.caption ? table.caption.textContent.trim() : ''; | |
const titles = [...table.querySelectorAll('th')].map(th => { | |
const innerHTML = th.innerHTML; | |