Skip to content

Commit 3464812

Browse files
author
tunnckoCore
committed
feat(vscode): port for VSCode, prettier formatting and etc stuff
closes #5, closes #7
1 parent 47359c3 commit 3464812

27 files changed

+1438
-258
lines changed

.eslintrc

-7
This file was deleted.

.eslintrc.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"extends": "standard",
3+
"rules": {
4+
"computed-property-spacing": [
5+
"error",
6+
"never"
7+
],
8+
"object-curly-spacing": [
9+
"error",
10+
"always"
11+
],
12+
"space-before-function-paren": [
13+
"error",
14+
"always"
15+
],
16+
"arrow-parens": [
17+
"error",
18+
"always"
19+
],
20+
"max-params": "error",
21+
"max-nested-callbacks": [
22+
"error",
23+
{
24+
"max": 5
25+
}
26+
],
27+
"max-depth": [
28+
"error",
29+
{
30+
"max": 5
31+
}
32+
],
33+
"no-empty": [
34+
"error",
35+
{
36+
"allowEmptyCatch": true
37+
}
38+
]
39+
}
40+
}

.verb.md

+28-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
55
[![atom package manager][apm-img]][apm-url]
66
[![apm downloads][downloads-img]][downloads-url]
7+
8+
[![vscode version][vscode-version-img]][vscode-version-url]
9+
[![vscode installs][vscode-installs-img]][vscode-installs-url]
10+
711
[![dependency status][david-img]][david-url]
812
[![standard code style][standard-img]][standard-url]
913

14+
[![commitizen friendly][czfriendly-img]][czfriendly-url]
15+
[![greenkeeper friendly][gkfriendly-img]][gkfriendly-url]
16+
1017
{%= include('highlight') %}
1118

1219
Highly opinionated to my needs - don't includes snippets that I don't use. But also is mixed between my previous Sublime [javascript-charlike-snippets](https://github.com/tunnckoCore/javascript-charlike-snippets), [standardjs-snippets](https://atom.io/packages/standardjs-snippets) and [es6-javascript](https://atom.io/packages/es6-javascript).
@@ -25,6 +32,12 @@ Install with [apm](https://atom.io/packages) _(Atom Editor's package manager)_
2532
$ apm install {%= name %}
2633
```
2734

35+
Or launch [VSCode](https://code.visualstudio.com/) Quick Open (`Ctrl+P`), paste the following command, and press enter.
36+
37+
```
38+
ext install modern-javascript-snippets
39+
```
40+
2841
## Snippets
2942
{%= generateSnippetDocs() %}
3043

@@ -34,8 +47,8 @@ $ apm install {%= name %}
3447
{% } %}
3548

3649
## Contributing
37-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/{%= repository %}/issues/new).
38-
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
50+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/{%= repository %}/issues/new).
51+
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
3952
If you need some help and can spent some cash, feel free to [contact me at CodeMentor.io](https://www.codementor.io/tunnckocore?utm_source=github&utm_medium=button&utm_term=tunnckocore&utm_campaign=github) too.
4053

4154
**In short:** If you want to contribute to that project, please follow these things
@@ -68,7 +81,7 @@ $ npm install && npm test
6881
+ [codementor/tunnckoCore](https://codementor.io/tunnckoCore)
6982

7083
## License
71-
{%= copyright({ start: 2016, linkify: true, prefix: 'Copyright', symbol: '©' }) %} {%= license %}
84+
{%= copyright({ start: 2016, linkify: true, prefix: 'Copyright', symbol: '©' }) %} {%= licenseStatement %}
7285

7386
***
7487

@@ -88,3 +101,15 @@ _Project scaffolded using [charlike][] cli._
88101

89102
[apm-url]: https://atom.io/packages/{%= name %}
90103
[apm-img]: https://img.shields.io/apm/v/{%= name %}.svg
104+
105+
[vscode-version-url]: https://marketplace.visualstudio.com/items?itemName=tunnckocore.{%= name %}
106+
[vscode-version-img]: http://vsmarketplacebadge.apphb.com/version-short/tunnckocore.{%= name %}.svg
107+
108+
[vscode-installs-url]: https://marketplace.visualstudio.com/items?itemName=tunnckocore.{%= name %}
109+
[vscode-installs-img]: http://vsmarketplacebadge.apphb.com/installs-short/tunnckocore.{%= name %}.svg
110+
111+
[czfriendly-url]: http://commitizen.github.io/cz-cli
112+
[czfriendly-img]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
113+
114+
[gkfriendly-url]: https://greenkeeper.io/
115+
[gkfriendly-img]: https://img.shields.io/badge/greenkeeper-friendly-brightgreen.svg

README.md

+55-27
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# modern-javascript-snippets
22

3-
> Modern javascript snippets for better productivity with support for JavaScript, Babel, TypeScript, JSX and semicolon-less code.
3+
> Atom & VSCode - Modern javascript snippets for better productivity with support for JavaScript, Babel, TypeScript, JSX and semicolon-less code.
44
55
[![atom package manager][apm-img]][apm-url]
66
[![apm downloads][downloads-img]][downloads-url]
7+
8+
[![vscode version][vscode-version-img]][vscode-version-url]
9+
[![vscode installs][vscode-installs-img]][vscode-installs-url]
10+
711
[![dependency status][david-img]][david-url]
812
[![standard code style][standard-img]][standard-url]
913

14+
[![commitizen friendly][czfriendly-img]][czfriendly-url]
15+
[![greenkeeper friendly][gkfriendly-img]][gkfriendly-url]
16+
1017
You might also be interested in [always-done](https://github.com/hybridables/always-done#readme).
1118

1219
Highly opinionated to my needs - don't includes snippets that I don't use. But also is mixed between my previous Sublime [javascript-charlike-snippets](https://github.com/tunnckoCore/javascript-charlike-snippets), [standardjs-snippets](https://atom.io/packages/standardjs-snippets) and [es6-javascript](https://atom.io/packages/es6-javascript).
@@ -17,6 +24,7 @@ please open an issue if you want such thing.
1724
The documentation is built and fully automated using [verb][], including [table of contents](#table-of-contents) and even the [snippets docs](#snippets).
1825

1926
## Table of Contents
27+
2028
- [Install](#install)
2129
- [Snippets](#snippets)
2230
* [assert](#assert)
@@ -54,10 +62,16 @@ Install with [apm](https://atom.io/packages) _(Atom Editor's package manager)_
5462
$ apm install modern-javascript-snippets
5563
```
5664

65+
Or launch [VSCode](https://code.visualstudio.com/) Quick Open (`Ctrl+P`), paste the following command, and press enter.
66+
67+
```
68+
ext install modern-javascript-snippets
69+
```
70+
5771
## Snippets
5872

5973
### assert
60-
> All [assert](./snippets/assert.cson) snippets
74+
> All [assert](././atom/assert.cson) snippets
6175
6276
#### `ase⇥` assert.strictEqual
6377

@@ -98,7 +112,7 @@ ${1:assert}.throws(${2:actual}, ${3:expected})${0}
98112
**[back to top](#readme)**
99113

100114
### async
101-
> All [async](./snippets/async.cson) snippets
115+
> All [async](././atom/async.cson) snippets
102116
103117
#### `cb⇥` Node callback
104118

@@ -141,7 +155,7 @@ ${1:promise}.catch((${2:err}) => {${0}})
141155
**[back to top](#readme)**
142156

143157
### classes
144-
> All [classes](./snippets/classes.cson) snippets
158+
> All [classes](././atom/classes.cson) snippets
145159
146160
#### `cs⇥` class
147161

@@ -194,7 +208,7 @@ function ${1:ClassName} (${2:args}) {
194208
**[back to top](#readme)**
195209

196210
### console
197-
> All [console](./snippets/console.cson) snippets
211+
> All [console](././atom/console.cson) snippets
198212
199213
#### `cl⇥` console.log
200214

@@ -223,7 +237,7 @@ console.dir(${0})
223237
**[back to top](#readme)**
224238

225239
### control-flow
226-
> All [control-flow](./snippets/control-flow.cson) snippets
240+
> All [control-flow](././atom/control-flow.cson) snippets
227241
228242
#### `if⇥` if statement
229243

@@ -294,7 +308,7 @@ try {
294308
**[back to top](#readme)**
295309

296310
### declarations
297-
> All [declarations](./snippets/declarations.cson) snippets
311+
> All [declarations](././atom/declarations.cson) snippets
298312
299313
#### `v⇥` var statement
300314

@@ -375,7 +389,7 @@ const ${1:name} = [
375389
**[back to top](#readme)**
376390

377391
### events
378-
> All [events](./snippets/events.cson) snippets
392+
> All [events](././atom/events.cson) snippets
379393
380394
#### `on⇥` on event handler
381395

@@ -416,7 +430,7 @@ ${1:emitter}.emit('${2:event}', ${3:args})
416430
**[back to top](#readme)**
417431

418432
### functions
419-
> All [functions](./snippets/functions.cson) snippets
433+
> All [functions](././atom/functions.cson) snippets
420434
421435
#### `f⇥` anonymous function
422436

@@ -463,7 +477,7 @@ function * (${1:args}) {${0}}
463477
#### `gfn⇥` named generator
464478

465479
```js
466-
function * ${1:name}(${2:args}) {${0}}
480+
function * ${1:name} (${2:args}) {${0}}
467481
```
468482

469483
#### `iife⇥` immediately-invoked function expression
@@ -495,7 +509,7 @@ ${1:fn}.bind(${2:this}, ${3:args})
495509
**[back to top](#readme)**
496510

497511
### iterables
498-
> All [iterables](./snippets/iterables.cson) snippets
512+
> All [iterables](././atom/iterables.cson) snippets
499513
500514
#### `fe⇥` forEach loop
501515

@@ -588,7 +602,7 @@ ${1:iterable}.some(${2:iterator})
588602
**[back to top](#readme)**
589603

590604
### json
591-
> All [json](./snippets/json.cson) snippets
605+
> All [json](././atom/json.cson) snippets
592606
593607
#### `;⇥` JSON key/value pair
594608

@@ -611,7 +625,7 @@ ${1:iterable}.some(${2:iterator})
611625
**[back to top](#readme)**
612626

613627
### loops
614-
> All [loops](./snippets/loops.cson) snippets
628+
> All [loops](././atom/loops.cson) snippets
615629
616630
#### `fl⇥` for loop
617631

@@ -662,7 +676,7 @@ while (i < len) {
662676
**[back to top](#readme)**
663677

664678
### misc
665-
> All [misc](./snippets/misc.cson) snippets
679+
> All [misc](././atom/misc.cson) snippets
666680
667681
#### `us⇥` use strict
668682

@@ -742,7 +756,7 @@ function fixture () {
742756
**[back to top](#readme)**
743757

744758
### modules-commonjs
745-
> All [modules-commonjs](./snippets/modules-commonjs.cson) snippets
759+
> All [modules-commonjs](././atom/modules-commonjs.cson) snippets
746760
747761
#### `req⇥` require module
748762

@@ -783,7 +797,7 @@ module.exports = exports['default'] = ${1:value}
783797
**[back to top](#readme)**
784798

785799
### modules-es2015
786-
> All [modules-es2015](./snippets/modules-es2015.cson) snippets
800+
> All [modules-es2015](././atom/modules-es2015.cson) snippets
787801
788802
#### `ex⇥` module export
789803

@@ -818,7 +832,7 @@ import { $2 } from '${1:pkg}'${3}
818832
**[back to top](#readme)**
819833

820834
### objects
821-
> All [objects](./snippets/objects.cson) snippets
835+
> All [objects](././atom/objects.cson) snippets
822836
823837
#### `kv⇥` key/value pair
824838

@@ -861,7 +875,7 @@ Object.keys(${1:obj})${0}
861875
**[back to top](#readme)**
862876

863877
### returns
864-
> All [returns](./snippets/returns.cson) snippets
878+
> All [returns](././atom/returns.cson) snippets
865879
866880
#### `r⇥` return
867881

@@ -916,7 +930,7 @@ return new Promise((resolve${1:, reject}) => {
916930
**[back to top](#readme)**
917931

918932
### testing
919-
> All [testing](./snippets/testing.cson) snippets
933+
> All [testing](././atom/testing.cson) snippets
920934
921935
#### `ita⇥` async test (mocha/mukla)
922936

@@ -945,7 +959,7 @@ ${1:test}('${2:description}', (${3:t}) => {
945959
**[back to top](#readme)**
946960

947961
### timers
948-
> All [timers](./snippets/timers.cson) snippets
962+
> All [timers](././atom/timers.cson) snippets
949963
950964
#### `st⇥` setTimeout
951965

@@ -982,7 +996,7 @@ setImmediate(() => {
982996
**[back to top](#readme)**
983997

984998
### types
985-
> All [types](./snippets/types.cson) snippets
999+
> All [types](././atom/types.cson) snippets
9861000
9871001
#### `S⇥` String
9881002

@@ -1066,12 +1080,14 @@ Array.isArray(${1:source})
10661080

10671081
## Related
10681082
- [always-done](https://www.npmjs.com/package/always-done): Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement… [more](https://github.com/hybridables/always-done#readme) | [homepage](https://github.com/hybridables/always-done#readme "Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement for [async-done][] - pass 100% of its tests plus more")
1083+
- [dush-router](https://www.npmjs.com/package/dush-router): A simple regex-based router for `dush`, `base`, `minibase` and anything based on them. Works on Browser and Node.js | [homepage](https://github.com/tunnckocore/dush-router#readme "A simple regex-based router for `dush`, `base`, `minibase` and anything based on them. Works on Browser and Node.js")
1084+
- [dush](https://www.npmjs.com/package/dush): Microscopic & functional event emitter in ~350 bytes, extensible through plugins | [homepage](https://github.com/tunnckocore/dush#readme "Microscopic & functional event emitter in ~350 bytes, extensible through plugins")
10691085
- [minibase](https://www.npmjs.com/package/minibase): Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing… [more](https://github.com/node-minibase/minibase#readme) | [homepage](https://github.com/node-minibase/minibase#readme "Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing [base][] plugins.")
10701086
- [try-catch-core](https://www.npmjs.com/package/try-catch-core): Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and… [more](https://github.com/hybridables/try-catch-core#readme) | [homepage](https://github.com/hybridables/try-catch-core#readme "Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and used in higher-level libs such as [always-done][] to handle completion of anything.")
10711087

10721088
## Contributing
1073-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/modern-javascript-snippets/issues/new).
1074-
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
1089+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/modern-javascript-snippets/issues/new).
1090+
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
10751091
If you need some help and can spent some cash, feel free to [contact me at CodeMentor.io](https://www.codementor.io/tunnckocore?utm_source=github&utm_medium=button&utm_term=tunnckocore&utm_campaign=github) too.
10761092

10771093
**In short:** If you want to contribute to that project, please follow these things
@@ -1107,23 +1123,23 @@ $ npm install && npm test
11071123
+ [codementor/tunnckoCore](https://codementor.io/tunnckoCore)
11081124

11091125
## License
1110-
Copyright © 2016-2017, [Charlike Mike Reagent](http://i.am.charlike.online). Released under the [MIT license](LICENSE).
1126+
Copyright © 2016-2017, [Charlike Mike Reagent](http://i.am.charlike.online). Released under the [MIT License](LICENSE).
11111127

11121128
***
11131129

1114-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.1, on January 15, 2017._
1130+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 20, 2017._
11151131
_Project scaffolded using [charlike][] cli._
11161132

11171133
[always-done]: https://github.com/hybridables/always-done
11181134
[async-done]: https://github.com/gulpjs/async-done
11191135
[base]: https://github.com/node-base/base
1120-
[charlike]: https://github.com/tunnckocore/charlike
1136+
[charlike]: https://github.com/tunnckoCore/charlike
11211137
[commitizen]: https://github.com/commitizen/cz-cli
11221138
[dezalgo]: https://github.com/npm/dezalgo
11231139
[extend-shallow]: https://github.com/jonschlinkert/extend-shallow
11241140
[once]: https://github.com/isaacs/once
11251141
[standard-version]: https://github.com/conventional-changelog/standard-version
1126-
[standard]: http://standardjs.com
1142+
[standard]: https://standardjs.com
11271143
[verb-generate-readme]: https://github.com/verbose/verb-generate-readme
11281144
[verb]: https://github.com/verbose/verb
11291145

@@ -1139,3 +1155,15 @@ _Project scaffolded using [charlike][] cli._
11391155
[apm-url]: https://atom.io/packages/modern-javascript-snippets
11401156
[apm-img]: https://img.shields.io/apm/v/modern-javascript-snippets.svg
11411157

1158+
[vscode-version-url]: https://marketplace.visualstudio.com/items?itemName=tunnckocore.modern-javascript-snippets
1159+
[vscode-version-img]: http://vsmarketplacebadge.apphb.com/version-short/tunnckocore.modern-javascript-snippets.svg
1160+
1161+
[vscode-installs-url]: https://marketplace.visualstudio.com/items?itemName=tunnckocore.modern-javascript-snippets
1162+
[vscode-installs-img]: http://vsmarketplacebadge.apphb.com/installs-short/tunnckocore.modern-javascript-snippets.svg
1163+
1164+
[czfriendly-url]: http://commitizen.github.io/cz-cli
1165+
[czfriendly-img]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
1166+
1167+
[gkfriendly-url]: https://greenkeeper.io/
1168+
[gkfriendly-img]: https://img.shields.io/badge/greenkeeper-friendly-brightgreen.svg
1169+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)