Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:[yas] Error in condition evaluation: No JavaScript AST available #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion snippets/js-ts-mode/.yas-parents

This file was deleted.

4 changes: 4 additions & 0 deletions snippets/js-ts-mode/al
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: alert
# --
alert($0);
10 changes: 10 additions & 0 deletions snippets/js-ts-mode/anfn
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# uuid: 289f0557-4e11-47c5-bcbf-1105bbec41ce
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: anonymousFunction
# key: anfn
# --

(${1:params}) => {
${2}
}
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: 6788dcb5-8d8e-4e30-a97b-83029ecaf89b
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: bindThis
# key: bnd
# --

this.${1:methodName} = this.${1:methodName}.bind(this)$0
12 changes: 12 additions & 0 deletions snippets/js-ts-mode/class
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: class
# key: class
# --
class ${1:Class}${2: extends ${3:ParentClass}} {
${4:constructor(${5:arg}) {
${6:super(arg);}
$7
\}}

$0
}
12 changes: 12 additions & 0 deletions snippets/js-ts-mode/cmmb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- mode: snippet -*-
# uuid: 983d648f-a7de-4e22-bab9-bca5cd6188a6
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: Comment Big Block
# key: cmmb
# --

/**
|--------------------------------------------------
| $1
|--------------------------------------------------
*/
6 changes: 6 additions & 0 deletions snippets/js-ts-mode/com
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: comment (/* ... */)
# --
/*
* $0
*/
Empty file.
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cas
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: b845ab40-1e04-4d11-bb0c-14266e733945
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.assert
# key: cas
# group: console
# --

console.assert(${1:expression}, ${2:object})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/ccl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 9619a671-e44a-4b59-b343-b55b3b1dbbcc
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.clear
# key: ccl
# group: console
# --

console.clear()
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cco
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: dcbcd0f7-7827-4f81-9777-809540ef5c10
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.count
# key: cco
# group: console
# --

console.count(${1:label})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cdi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: d2272fe8-85d4-44f5-b74c-39a88bb50487
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.dir
# key: cdi
# group: console
# --

console.dir(${1:object})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 54ad9659-8b18-40a0-9096-48131f9577da
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.error
# key: cer
# group: console
# --

console.error(${1:object})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cge
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: b3954656-b9c0-4061-b436-e7412ce008ad
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.groupEnd
# key: cge
# group: console
# --

console.groupEnd()
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cgr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: afebe290-f0e6-403a-9c4f-da33451115cb
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.group
# key: cgr
# group: console
# --

console.group("${1:label}")
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cin
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 006ec5e1-f229-4989-b8b2-fe1da1aab907
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.info
# key: cin
# group: console
# --

console.info(${1:object})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/clg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 0a1a6d75-a8e0-43fe-b049-1e96c2e04b51
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.log
# key: clg
# group: console
# --

console.log(${1:object})
7 changes: 7 additions & 0 deletions snippets/js-ts-mode/console/clo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: console.log (formatted)
# key: clo
# group: console
# --

console.log('$1: ', ${1:object})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cta
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 9c2aa6ee-9729-46d9-afdb-b6dc21f9f2e7
# contributor: Laam Pui <lpwowo@gmail.com>
# name: console.table
# key: cta
# group: console
# --

console.table(${1:object})
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cte
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 9dd0d1c8-f4e8-4d16-8ca1-4ce72e7936cb
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.timeEnd
# key: cte
# group: console
# --

console.timeEnd('${1:object}')
9 changes: 9 additions & 0 deletions snippets/js-ts-mode/console/cwa
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# uuid: 3d8fde97-df25-4515-a8e9-5096db21cfb7
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: console.warn
# key: cwa
# group: console
# --

console.warn(${1:object})
5 changes: 5 additions & 0 deletions snippets/js-ts-mode/const
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: const declaration
# key: const
# --
const ${1:name} = ${2:initial};
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/dar
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: 1867e4d6-1042-422e-b114-174969b9325e
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: destructingArray
# key: dar
# --

const [${1:propertyName}] = ${2:arrayToDestruct}
5 changes: 5 additions & 0 deletions snippets/js-ts-mode/debugger
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: debugger
# key: dbg
# --
debugger;
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/dob
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: 0a552742-2fa3-4d23-8fe6-fe7f211b642a
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: destructingObject
# key: dob
# --

const {${1:propertyName}} = ${2:objectToDestruct}
6 changes: 6 additions & 0 deletions snippets/js-ts-mode/each
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: each
# --
${1:collection}.forEach(function (${2:elem}) {
$0
});
10 changes: 10 additions & 0 deletions snippets/js-ts-mode/edf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# uuid: 45f3a8b4-7ed0-4d80-aa77-1cf79339b6b6
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: exportDefaultFunction
# key: edf
# --

export default (${1:params}) => {
$0
}
6 changes: 6 additions & 0 deletions snippets/js-ts-mode/el
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: else
# --
else {
$0
}
10 changes: 10 additions & 0 deletions snippets/js-ts-mode/enf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# uuid: 095f24bf-5c76-4d0b-862e-a1f0ab1e1b95
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: exportNamedFunction
# key: enf
# --

export const ${1:functionName} = (${2:params}) => {
$0
}
5 changes: 5 additions & 0 deletions snippets/js-ts-mode/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: new error
# key: err
# --
new Error(${1:message});
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/exa
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: 1391f808-8044-4878-b551-9f129330507c
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: exportAs
# key: exa
# --

export { ${2:originalName} as ${3:alias} } from '${1:module}'$0
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/exd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: b9a77d53-af00-4acc-90e5-0259edef0326
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: exportDestructing
# key: exd
# --

export { $2 } from '${1:module}'$0
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: 19643fe0-3063-41cd-b384-9f0a51b2f809
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: exportDefault
# key: exp
# --

export default $1$0
10 changes: 10 additions & 0 deletions snippets/js-ts-mode/fin
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# uuid: 8d343f0b-28ae-4e2c-84a4-2e557603f28b
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: forIn
# key: fin
# --

for(let ${1:item} in ${2:object}) {
$0
}
5 changes: 5 additions & 0 deletions snippets/js-ts-mode/flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: /* @flow */
# key: flow
# --
/* @flow */
10 changes: 10 additions & 0 deletions snippets/js-ts-mode/fof
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# uuid: eec73b34-fb19-4d4c-b4fd-853b2eca6f19
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: forOf
# key: fof
# --

for(let ${1:item} of ${2:object}) {
$0
}
6 changes: 6 additions & 0 deletions snippets/js-ts-mode/for
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: for
# --
for (var ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) {
$0
}
10 changes: 10 additions & 0 deletions snippets/js-ts-mode/fre
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# uuid: a59f3383-a176-4f60-a992-0d2b983eaa5c
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: forEach
# key: fre
# --

${1:array}.forEach(${2:currentItem} => {
$0
})
7 changes: 7 additions & 0 deletions snippets/js-ts-mode/function
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: function
# key: f
# --
function ${1:name}(${2:arg}) {
$0
}
6 changes: 6 additions & 0 deletions snippets/js-ts-mode/if
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: if
# --
if (${1:condition}) {
$0
}
8 changes: 8 additions & 0 deletions snippets/js-ts-mode/ima
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# uuid: 7c3ddd59-68e7-456c-a906-4241cdaeaf9e
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: importAs
# key: ima
# --

import { ${2:originalName} as ${3:alias} } from '${1:module}'$0
Loading