javascript-standard-snippets

JavaScript Standard Style Snippets for Atom

jprichardson

6,183

6

0.2.1

MIT

GitHub

JavaScript Standard Style Snippets for Atom

Install

Go to Atom > Preferences... then search for JavaScript Standard Snippets in the Packages tab.

or..

	apm install javascript-standard-snippets

Credits

This package is a fork of

So thanks to zenorocha for helping these snippets come full-circle.

Why not javascript-snippets package? Because it doesn't adhere to JavaScript Standard Style and doesn't support ES2015.

Snippets Summary

Console

[cd] console.dir

console.dir(${1:obj})

[ce] console.error

console.error(${1:error})

[cl] console.log

console.log(${1:message})

Control Flow

[pe] process.exit

process.exit(${1:code})

Function

[fn] function

function ${1:methodName} (${2:arguments}) {
	${0:// body...}
}

[afn] anonymous function

function (${1:arguments}) {
	${0:// body...}
}

[me] module.exports

module.exports = ${1:name}

[req] require

require('${1:module}')

Testing

[ase] assert.strictEqual

assert.strictEqual(${1:actual}, ${2:expected})

[asd] assert.deepEqual

assert.deepEqual(${1:actual}, ${2:expected})

[desc] describe

describe('${1:description}', function () {
	${0:// body...}
})

[ita] it asynchronous

it('${1:description}', function (done) {
	${0:// body...}
})

[its] it synchronous

it('${1:description}', function () {
	${0:// body...}
})

Development / Contributions

js-standard-style

Wanna suggest new snippets? Excellent! First, make sure that they adhere to JavaScript Standard Style. This means that if you suggest that any of these snippets should have semicolons, your suggestion will be rejected :p

I have no intention of maintaining compability with my older sublime JavaScript snippet package.

This package will adhere to semver. This means until it's 1.0, you can and should expect breaking changes.

I'm particularly interested in ES6 (ES2015)/ES7 snippet suggestions.

Please don't suggest maintaining snippets for the sake of ES5 compatibility, it's not gonna happen.

Alternatives

License

MIT

Copyright (c) JP Richardson