Guild Education JavaScript Style
At Guild, our JavaScript style is based on JavaScript Standard Style with a few exceptions:
- Function declarations should not have a space before the parentheses:
function name (arg) { ... }
function name(arg) { ... }
- The * in
yield*
expressions and generator functions must have a space after, but not before:
yield * increment()
yield *increment()
yield* increment()
function * increment() { ... }
function *increment() { ... }
function* increment() { ... }
Install
yarn add -D https://github.com/GuildEducationInc/eslint-config-guild.git
Usage
To use the Guild JavaScript Style config, first add eslint
to your project:
yarn add -D eslint
Then, add this to your .eslintrc file:
{
"extends": "guild"
}
Note: We omitted the eslint-config-
prefix since it is automatically assumed by ESLint